summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorNorbert Lange <nolange79@gmail.com>2021-02-03 01:25:06 +0100
committerNorbert Lange <nolange79@gmail.com>2021-02-22 14:30:43 +0100
commit29eaf09be4e9cd7fa537718466faf0c28004e08e (patch)
tree588b20fe7e76d0582a1f4970baec48f2d90e3b39 /Source
parentb6e9cca64f41d20d6eaca46f151e2efd07ccafbf (diff)
Cleanup X11 and XRANDR Macros
This fixes build with X11 enabled and XRANDR disabled.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinNoGUI/PlatformX11.cpp1
-rw-r--r--Source/Core/DolphinQt/MainWindow.cpp2
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.h2
-rw-r--r--Source/Core/UICommon/UICommon.cpp6
-rw-r--r--Source/Core/UICommon/UICommon.h2
5 files changed, 7 insertions, 6 deletions
diff --git a/Source/Core/DolphinNoGUI/PlatformX11.cpp b/Source/Core/DolphinNoGUI/PlatformX11.cpp
index 8eb8f2b802..c57e60bd9a 100644
--- a/Source/Core/DolphinNoGUI/PlatformX11.cpp
+++ b/Source/Core/DolphinNoGUI/PlatformX11.cpp
@@ -18,6 +18,7 @@
#include <X11/Xatom.h>
#include <X11/Xlib.h>
+#include <X11/Xutil.h>
#include <X11/keysym.h>
#include "UICommon/X11Utils.h"
#include "VideoCommon/RenderBase.h"
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp
index 20572d88b2..5e9b9b09cb 100644
--- a/Source/Core/DolphinQt/MainWindow.cpp
+++ b/Source/Core/DolphinQt/MainWindow.cpp
@@ -1463,7 +1463,7 @@ void MainWindow::UpdateScreenSaverInhibition()
m_is_screensaver_inhibited = inhibit;
-#if defined(HAVE_XRANDR) && HAVE_XRANDR
+#ifdef HAVE_X11
if (GetWindowSystemType() == WindowSystemType::X11)
UICommon::InhibitScreenSaver(winId(), inhibit);
#else
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
index ffa189437f..254516fb6e 100644
--- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
+++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
@@ -18,7 +18,7 @@
#ifdef _WIN32
#define CIFACE_USE_WIN32
#endif
-#if defined(HAVE_X11) && HAVE_X11
+#ifdef HAVE_X11
#define CIFACE_USE_XLIB
#endif
#if defined(__APPLE__)
diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp
index ec612df3fe..81d8bf23e2 100644
--- a/Source/Core/UICommon/UICommon.cpp
+++ b/Source/Core/UICommon/UICommon.cpp
@@ -39,7 +39,7 @@
#include "UICommon/UICommon.h"
#include "UICommon/USBUtils.h"
-#if defined(HAVE_XRANDR) && HAVE_XRANDR
+#ifdef HAVE_X11
#include "UICommon/X11Utils.h"
#endif
@@ -394,7 +394,7 @@ bool TriggerSTMPowerEvent()
return true;
}
-#if defined(HAVE_XRANDR) && HAVE_XRANDR
+#ifdef HAVE_X11
void InhibitScreenSaver(Window win, bool inhibit)
#else
void InhibitScreenSaver(bool inhibit)
@@ -403,7 +403,7 @@ void InhibitScreenSaver(bool inhibit)
// 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
+#ifdef HAVE_X11
X11Utils::InhibitScreensaver(win, inhibit);
#endif
diff --git a/Source/Core/UICommon/UICommon.h b/Source/Core/UICommon/UICommon.h
index 830dc064e5..dd6ef4ccc9 100644
--- a/Source/Core/UICommon/UICommon.h
+++ b/Source/Core/UICommon/UICommon.h
@@ -13,7 +13,7 @@ namespace UICommon
void Init();
void Shutdown();
-#if defined(HAVE_XRANDR) && HAVE_XRANDR
+#ifdef HAVE_X11
void InhibitScreenSaver(unsigned long win, bool enable);
#else
void InhibitScreenSaver(bool enable);