From a917d247ed44ada5a6e484fa0b28bfedb5ac6803 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Tue, 24 Jan 2017 03:53:47 +0100 Subject: [PATCH] DolphinWX: Remove HAVE_WX preprocessor define I think we don't have to double check it when building the WX target. --- CMakeLists.txt | 1 - Source/Core/Common/Common.h | 3 --- Source/Core/DolphinWX/Frame.cpp | 4 ++++ Source/Core/DolphinWX/ISOFile.h | 7 ------- Source/Core/DolphinWX/X11Utils.cpp | 4 ---- Source/Core/DolphinWX/X11Utils.h | 8 -------- 6 files changed, 4 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c80e059c74..dd169046ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -977,7 +977,6 @@ if(NOT DISABLE_WX) set(wxWidgets_FOUND TRUE) set(wxWidgets_LIBRARIES "wx") endif(wxWidgets_FOUND) - add_definitions(-DHAVE_WX=1) endif(NOT DISABLE_WX) if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD") diff --git a/Source/Core/Common/Common.h b/Source/Core/Common/Common.h index 8be79c3cdc..ff9cea5104 100644 --- a/Source/Core/Common/Common.h +++ b/Source/Core/Common/Common.h @@ -37,9 +37,6 @@ extern const std::string scm_distributor_str; // Memory leak checks #define CHECK_HEAP_INTEGRITY() -// Since they are always around on Windows -#define HAVE_WX 1 - // Debug definitions #if defined(_DEBUG) #include diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 7bf2f7e1e1..817933cd63 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -71,6 +71,10 @@ #include "VideoCommon/VideoConfig.h" #if defined(HAVE_X11) && HAVE_X11 + +#include +#include + // X11Utils nastiness that's only used here namespace X11Utils { diff --git a/Source/Core/DolphinWX/ISOFile.h b/Source/Core/DolphinWX/ISOFile.h index 836b453714..d793860759 100644 --- a/Source/Core/DolphinWX/ISOFile.h +++ b/Source/Core/DolphinWX/ISOFile.h @@ -11,10 +11,8 @@ #include "Common/Common.h" -#if defined(HAVE_WX) && HAVE_WX #include #include -#endif namespace DiscIO { @@ -60,12 +58,9 @@ public: u64 GetVolumeSize() const { return m_VolumeSize; } // 0 is the first disc, 1 is the second disc u8 GetDiscNumber() const { return m_disc_number; } -#if defined(HAVE_WX) && HAVE_WX // NOTE: Banner image is at the original resolution, use WxUtils::ScaleImageToBitmap // to display it const wxImage& GetBannerImage() const { return m_image; } -#endif - void DoState(PointerWrap& p); private: @@ -90,9 +85,7 @@ private: DiscIO::BlobType m_blob_type; u16 m_Revision; -#if defined(HAVE_WX) && HAVE_WX wxImage m_image; -#endif bool m_Valid; std::vector m_pImage; int m_ImageWidth, m_ImageHeight; diff --git a/Source/Core/DolphinWX/X11Utils.cpp b/Source/Core/DolphinWX/X11Utils.cpp index d20f0500eb..7093e12492 100644 --- a/Source/Core/DolphinWX/X11Utils.cpp +++ b/Source/Core/DolphinWX/X11Utils.cpp @@ -13,13 +13,9 @@ extern char** environ; -#if defined(HAVE_WX) && HAVE_WX #include #include -#include "DolphinWX/WxUtils.h" -#endif - namespace X11Utils { bool ToggleFullscreen(Display* dpy, Window win) diff --git a/Source/Core/DolphinWX/X11Utils.h b/Source/Core/DolphinWX/X11Utils.h index c673e1aabd..1efaac5d66 100644 --- a/Source/Core/DolphinWX/X11Utils.h +++ b/Source/Core/DolphinWX/X11Utils.h @@ -12,12 +12,6 @@ // is terrible, but such is the life with Xlib. #include // NOLINT -#if defined(HAVE_WX) && HAVE_WX -#include -#include -#include -#endif - #if defined(HAVE_XRANDR) && HAVE_XRANDR #include #endif @@ -33,10 +27,8 @@ namespace X11Utils { bool ToggleFullscreen(Display* dpy, Window win); -#if defined(HAVE_WX) && HAVE_WX Window XWindowFromHandle(void* Handle); Display* XDisplayFromHandle(void* Handle); -#endif void InhibitScreensaver(Display* dpy, Window win, bool suspend);