mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
UICommon: Avoid including Xrandr.h
Xlib has really terrible headers that declare non-namespaced macros and typedefs for common words. Just wasted 10 minutes trying to figure out why a unit test failed to build before I remembered it was Xrandr.h conflicting with our enum class members again. To fix the issue, this removes the Display* parameter from the EnableScreensaver function (which was unused) so we don't have to include Xrandr.h anymore.
This commit is contained in:
@ -338,7 +338,7 @@ bool TriggerSTMPowerEvent()
|
||||
}
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_X11
|
||||
void EnableScreenSaver(Display* display, Window win, bool enable)
|
||||
void EnableScreenSaver(Window win, bool enable)
|
||||
#else
|
||||
void EnableScreenSaver(bool enable)
|
||||
#endif
|
||||
@ -349,7 +349,7 @@ void EnableScreenSaver(bool enable)
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
if (SConfig::GetInstance().bDisableScreenSaver)
|
||||
{
|
||||
X11Utils::InhibitScreensaver(display, win, !enable);
|
||||
X11Utils::InhibitScreensaver(win, !enable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -8,17 +8,13 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#endif
|
||||
|
||||
namespace UICommon
|
||||
{
|
||||
void Init();
|
||||
void Shutdown();
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
void EnableScreenSaver(Display* display, Window win, bool enable);
|
||||
void EnableScreenSaver(unsigned long win, bool enable);
|
||||
#else
|
||||
void EnableScreenSaver(bool enable);
|
||||
#endif
|
||||
|
@ -43,7 +43,7 @@ bool ToggleFullscreen(Display* dpy, Window win)
|
||||
return true;
|
||||
}
|
||||
|
||||
void InhibitScreensaver(Display* dpy, Window win, bool suspend)
|
||||
void InhibitScreensaver(Window win, bool suspend)
|
||||
{
|
||||
char id[11];
|
||||
snprintf(id, sizeof(id), "0x%lx", win);
|
||||
|
@ -24,7 +24,7 @@ bool ToggleFullscreen(Display* dpy, Window win);
|
||||
Window XWindowFromHandle(void* Handle);
|
||||
Display* XDisplayFromHandle(void* Handle);
|
||||
|
||||
void InhibitScreensaver(Display* dpy, Window win, bool suspend);
|
||||
void InhibitScreensaver(Window win, bool suspend);
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
class XRRConfiguration
|
||||
|
Reference in New Issue
Block a user