mirror of https://github.com/encounter/SDL.git
Fixed D-Bus battery refresh call
This commit is contained in:
parent
e1cf8d8748
commit
03c4405b3b
|
@ -565,7 +565,7 @@ check_upower_device(DBusConnection *conn, const char *path, SDL_PowerState *stat
|
||||||
return;
|
return;
|
||||||
} else if (!ui32) {
|
} else if (!ui32) {
|
||||||
st = SDL_POWERSTATE_NO_BATTERY;
|
st = SDL_POWERSTATE_NO_BATTERY;
|
||||||
} else if (!SDL_DBus_CallMethodOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "Refresh", DBUS_TYPE_INVALID)) {
|
} else if (!SDL_DBus_CallMethodOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "Refresh", DBUS_TYPE_INVALID, DBUS_TYPE_INVALID)) {
|
||||||
return;
|
return;
|
||||||
} else if (!SDL_DBus_QueryPropertyOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "State", DBUS_TYPE_UINT32, &ui32)) {
|
} else if (!SDL_DBus_QueryPropertyOnConnection(conn, UPOWER_DBUS_NODE, path, UPOWER_DEVICE_DBUS_INTERFACE, "State", DBUS_TYPE_UINT32, &ui32)) {
|
||||||
st = SDL_POWERSTATE_UNKNOWN; /* uh oh */
|
st = SDL_POWERSTATE_UNKNOWN; /* uh oh */
|
||||||
|
|
Loading…
Reference in New Issue