From 2f94297c901bf7161632fe88f23dcf987fa625f6 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 8 Apr 2014 19:03:32 +0300 Subject: [PATCH] Fix build with XRandR headers not installed --- source/graphics/x11/display.cpp | 2 ++ source/graphics/x11/display_platform.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/source/graphics/x11/display.cpp b/source/graphics/x11/display.cpp index c2a4eaf..7b8f9da 100644 --- a/source/graphics/x11/display.cpp +++ b/source/graphics/x11/display.cpp @@ -38,6 +38,7 @@ int x_error_handler(Display *display, XErrorEvent *event) return 0; } +#ifdef WITH_XRANDR inline Msp::Graphics::VideoRotation rotation_from_sys(Rotation r) { switch(r) @@ -59,6 +60,7 @@ inline Rotation rotation_to_sys(Msp::Graphics::VideoRotation r) default: return RR_Rotate_0; } } +#endif bool monitor_x_compare(const Msp::Graphics::Monitor &m1, const Msp::Graphics::Monitor &m2) { diff --git a/source/graphics/x11/display_platform.h b/source/graphics/x11/display_platform.h index 8db3e98..3a213c0 100644 --- a/source/graphics/x11/display_platform.h +++ b/source/graphics/x11/display_platform.h @@ -2,14 +2,21 @@ #define MSP_GRAPHICS_DISPLAY_PLATFORM_H_ #include +#ifdef WITH_XRANDR #include +#endif namespace Msp { namespace Graphics { typedef ::Display *DisplayHandle; +#ifdef WITH_XRANDR typedef RROutput MonitorHandle; typedef RRMode ModeHandle; +#else +typedef int MonitorHandle; +typedef int ModeHandle; +#endif } // namespace Graphics } // namespace Msp -- 2.45.2