# SDL: Fixed D-Bus battery refresh call

**URL:** <https://discourse.libsdl.org/t/sdl-fixed-d-bus-battery-refresh-call/34714>\
**Category:** SDL Commits\
**Created:** [February 1, 2022, 5:34pm UTC](https://discourse.libsdl.org/t/sdl-fixed-d-bus-battery-refresh-call/34714 "2022-02-01T17:34:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [February 1, 2022, 5:34pm UTC](https://discourse.libsdl.org/t/sdl-fixed-d-bus-battery-refresh-call/34714/1 "2022-02-01T17:34:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/03c4405b3b5fac46a86ec8c6c20884db490b478a>

```diff
From 03c4405b3b5fac46a86ec8c6c20884db490b478a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 1 Feb 2022 09:32:38 -0800
Subject: [PATCH] Fixed D-Bus battery refresh call

---
 src/power/linux/SDL_syspower.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/power/linux/SDL_syspower.c b/src/power/linux/SDL_syspower.c
index 92a66ba97b4..1f238c52410 100644
--- a/src/power/linux/SDL_syspower.c
+++ b/src/power/linux/SDL_syspower.c
@@ -565,7 +565,7 @@ check_upower_device(DBusConnection *conn, const char *path, SDL_PowerState *stat
         return;
     } else if (!ui32) {
         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;
     } 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 */

```
