mirror of
https://github.com/libretro/RetroArch
synced 2025-02-03 17:54:04 +00:00
Style nits
This commit is contained in:
parent
ee0cbd4012
commit
cb17c0f493
@ -81,7 +81,7 @@ static void dbus_ensure_connection(void)
|
||||
dbus_error_free(&err);
|
||||
}
|
||||
|
||||
if (dbus_connection != NULL)
|
||||
if (dbus_connection)
|
||||
dbus_connection_set_exit_on_disconnect(dbus_connection, true);
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ static bool dbus_screensaver_inhibit(void)
|
||||
DBusMessage *reply = NULL;
|
||||
bool ret = false;
|
||||
|
||||
if (dbus_connection == NULL)
|
||||
if (!dbus_connection)
|
||||
return false; /* DBus connection was not obtained */
|
||||
|
||||
if (dbus_screensaver_cookie > 0)
|
||||
@ -120,7 +120,8 @@ static bool dbus_screensaver_inhibit(void)
|
||||
if (!dbus_message_append_args(msg,
|
||||
DBUS_TYPE_STRING, &app,
|
||||
DBUS_TYPE_STRING, &reason,
|
||||
DBUS_TYPE_INVALID)) {
|
||||
DBUS_TYPE_INVALID))
|
||||
{
|
||||
dbus_message_unref(msg);
|
||||
return false;
|
||||
}
|
||||
@ -328,6 +329,7 @@ static void xdg_screensaver_uninhibit(Window wnd)
|
||||
snprintf(cmd, sizeof(cmd), "xdg-screensaver resume 0x%x", (int)wnd);
|
||||
|
||||
ret = system(cmd);
|
||||
|
||||
if (ret == -1)
|
||||
{
|
||||
xdg_screensaver_available = false;
|
||||
@ -342,15 +344,16 @@ static void xdg_screensaver_uninhibit(Window wnd)
|
||||
|
||||
void x11_suspend_screensaver_xdg_screensaver(Window wnd, bool enable)
|
||||
{
|
||||
if (enable) xdg_screensaver_inhibit(wnd);
|
||||
if (enable)
|
||||
xdg_screensaver_inhibit(wnd);
|
||||
xdg_screensaver_uninhibit(wnd);
|
||||
}
|
||||
|
||||
void x11_suspend_screensaver(Window wnd, bool enable)
|
||||
{
|
||||
#ifdef HAVE_DBUS
|
||||
/* Fall-through */
|
||||
if (!x11_suspend_screensaver_dbus(enable))
|
||||
if (x11_suspend_screensaver_dbus(enable))
|
||||
return;
|
||||
#endif
|
||||
x11_suspend_screensaver_xdg_screensaver(wnd, enable);
|
||||
}
|
||||
@ -477,8 +480,8 @@ unsigned x11_get_xinerama_monitor(Display *dpy, int x, int y,
|
||||
int i, num_screens = 0;
|
||||
unsigned monitor = 0;
|
||||
int largest_area = 0;
|
||||
|
||||
XineramaScreenInfo *info = x11_query_screens(dpy, &num_screens);
|
||||
|
||||
RARCH_LOG("[X11]: Xinerama screens: %d.\n", num_screens);
|
||||
|
||||
for (i = 0; i < num_screens; i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user