From d702f3b4ad803735d9bb709ef050ba5ebc35b1db Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Thu, 11 Feb 2021 22:48:46 -0800 Subject: [PATCH] DolphinNoGUI/PlatformX11: Work around X.h's None being undefined --- Source/Core/DolphinNoGUI/PlatformX11.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinNoGUI/PlatformX11.cpp b/Source/Core/DolphinNoGUI/PlatformX11.cpp index b44620a048..f09a16ba1a 100644 --- a/Source/Core/DolphinNoGUI/PlatformX11.cpp +++ b/Source/Core/DolphinNoGUI/PlatformX11.cpp @@ -4,6 +4,12 @@ #include +// X.h defines None to be 0L, but other parts of Dolphin undef that so that +// None can be used in enums. Work around that here by copying the definition +// before it is undefined. +#include +static constexpr auto X_None = None; + #include "DolphinNoGUI/Platform.h" #include "Common/MsgHandler.h" @@ -47,7 +53,7 @@ private: Display* m_display = nullptr; Window m_window = {}; - Cursor m_blank_cursor = None; + Cursor m_blank_cursor = X_None; #ifdef HAVE_XRANDR X11Utils::XRRConfiguration* m_xrr_config = nullptr; #endif