aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dolphin-emu/fix-compilation-without-xrandr-support.patch
blob: 9d1c9ff3338f4434398950515fe289f25e27a0a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 7bb9f502cf4505d7f30b8f0a3303e05464fafe44 Mon Sep 17 00:00:00 2001
From: Shiz <hi@shiz.me>
Date: Sat, 29 Jun 2019 02:31:24 +0200
Subject: [PATCH] Core/UICommon: fix compilation without X RandR support

---
 Source/Core/UICommon/UICommon.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
index 935d07b043f..27fe62307d1 100644
--- a/Source/Core/UICommon/UICommon.cpp
+++ b/Source/Core/UICommon/UICommon.cpp
@@ -367,16 +367,15 @@ bool TriggerSTMPowerEvent()
   return true;
 }
 
-#if defined(HAVE_XRANDR) && HAVE_X11
-void EnableScreenSaver(Window win, bool enable)
-#else
+#if !defined(HAVE_XRANDR) || !HAVE_XRANDR
 void EnableScreenSaver(bool enable)
-#endif
+{
+#else
+void EnableScreenSaver(Window win, bool enable)
 {
   // Inhibit the screensaver. Depending on the operating system this may also
   // disable low-power states and/or screen dimming.
 
-#if defined(HAVE_X11) && HAVE_X11
   if (Config::Get(Config::MAIN_DISABLE_SCREENSAVER))
   {
     X11Utils::InhibitScreensaver(win, !enable);