mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Better handling of wireless devies that get turned off. The dongle still responds but it sends empty packets.
This commit is contained in:
@@ -1096,13 +1096,11 @@ namespace GHelper
|
||||
{
|
||||
b.Text = m.GetDisplayName() + "\n" + m.Battery + "%"
|
||||
+ (m.Charging ? "(" + Properties.Strings.Charging + ")" : "");
|
||||
b.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Mouse is either not connected or in standby
|
||||
b.Text = m.GetDisplayName() + "\n(" + Properties.Strings.NotConnected + ")";
|
||||
b.Enabled = false;
|
||||
}
|
||||
|
||||
switch (m.DeviceType())
|
||||
@@ -1144,7 +1142,7 @@ namespace GHelper
|
||||
if (iph.DeviceType() == PeripheralType.Mouse)
|
||||
{
|
||||
AsusMouse? am = iph as AsusMouse;
|
||||
if (am is null)
|
||||
if (am is null || !am.IsDeviceReady)
|
||||
{
|
||||
//Should not happen if all device classes are implemented correctly. But better safe than sorry.
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user