mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
(X11) Do not keep appending to suspend screensaver if not available
This commit is contained in:
parent
b20989d31d
commit
ca63357b54
1 changed files with 10 additions and 0 deletions
|
@ -145,6 +145,10 @@ void x11_suspend_screensaver(Window wnd)
|
|||
{
|
||||
int ret;
|
||||
char cmd[64] = {0};
|
||||
static bool screensaver_na = false;
|
||||
|
||||
if (screensaver_na)
|
||||
return;
|
||||
|
||||
RARCH_LOG("Suspending screensaver (X11).\n");
|
||||
|
||||
|
@ -152,9 +156,15 @@ void x11_suspend_screensaver(Window wnd)
|
|||
|
||||
ret = system(cmd);
|
||||
if (ret == -1)
|
||||
{
|
||||
screensaver_na = true;
|
||||
RARCH_WARN("Failed to launch xdg-screensaver.\n");
|
||||
}
|
||||
else if (WEXITSTATUS(ret))
|
||||
{
|
||||
screensaver_na = true;
|
||||
RARCH_WARN("Could not suspend screen saver.\n");
|
||||
}
|
||||
}
|
||||
|
||||
static bool get_video_mode(Display *dpy, unsigned width, unsigned height,
|
||||
|
|
Loading…
Add table
Reference in a new issue