DolphinWX: Remove HAVE_WX preprocessor define

I think we don't have to double check it when building the WX target.
This commit is contained in:
Florent Castelli 2017-01-24 03:53:47 +01:00
parent 0baf1c78c0
commit a917d247ed
6 changed files with 4 additions and 23 deletions

View File

@ -977,7 +977,6 @@ if(NOT DISABLE_WX)
set(wxWidgets_FOUND TRUE) set(wxWidgets_FOUND TRUE)
set(wxWidgets_LIBRARIES "wx") set(wxWidgets_LIBRARIES "wx")
endif(wxWidgets_FOUND) endif(wxWidgets_FOUND)
add_definitions(-DHAVE_WX=1)
endif(NOT DISABLE_WX) endif(NOT DISABLE_WX)
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD") if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD")

View File

@ -37,9 +37,6 @@ extern const std::string scm_distributor_str;
// Memory leak checks // Memory leak checks
#define CHECK_HEAP_INTEGRITY() #define CHECK_HEAP_INTEGRITY()
// Since they are always around on Windows
#define HAVE_WX 1
// Debug definitions // Debug definitions
#if defined(_DEBUG) #if defined(_DEBUG)
#include <crtdbg.h> #include <crtdbg.h>

View File

@ -71,6 +71,10 @@
#include "VideoCommon/VideoConfig.h" #include "VideoCommon/VideoConfig.h"
#if defined(HAVE_X11) && HAVE_X11 #if defined(HAVE_X11) && HAVE_X11
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
// X11Utils nastiness that's only used here // X11Utils nastiness that's only used here
namespace X11Utils namespace X11Utils
{ {

View File

@ -11,10 +11,8 @@
#include "Common/Common.h" #include "Common/Common.h"
#if defined(HAVE_WX) && HAVE_WX
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
#endif
namespace DiscIO namespace DiscIO
{ {
@ -60,12 +58,9 @@ public:
u64 GetVolumeSize() const { return m_VolumeSize; } u64 GetVolumeSize() const { return m_VolumeSize; }
// 0 is the first disc, 1 is the second disc // 0 is the first disc, 1 is the second disc
u8 GetDiscNumber() const { return m_disc_number; } u8 GetDiscNumber() const { return m_disc_number; }
#if defined(HAVE_WX) && HAVE_WX
// NOTE: Banner image is at the original resolution, use WxUtils::ScaleImageToBitmap // NOTE: Banner image is at the original resolution, use WxUtils::ScaleImageToBitmap
// to display it // to display it
const wxImage& GetBannerImage() const { return m_image; } const wxImage& GetBannerImage() const { return m_image; }
#endif
void DoState(PointerWrap& p); void DoState(PointerWrap& p);
private: private:
@ -90,9 +85,7 @@ private:
DiscIO::BlobType m_blob_type; DiscIO::BlobType m_blob_type;
u16 m_Revision; u16 m_Revision;
#if defined(HAVE_WX) && HAVE_WX
wxImage m_image; wxImage m_image;
#endif
bool m_Valid; bool m_Valid;
std::vector<u8> m_pImage; std::vector<u8> m_pImage;
int m_ImageWidth, m_ImageHeight; int m_ImageWidth, m_ImageHeight;

View File

@ -13,13 +13,9 @@
extern char** environ; extern char** environ;
#if defined(HAVE_WX) && HAVE_WX
#include <algorithm> #include <algorithm>
#include <string> #include <string>
#include "DolphinWX/WxUtils.h"
#endif
namespace X11Utils namespace X11Utils
{ {
bool ToggleFullscreen(Display* dpy, Window win) bool ToggleFullscreen(Display* dpy, Window win)

View File

@ -12,12 +12,6 @@
// is terrible, but such is the life with Xlib. // is terrible, but such is the life with Xlib.
#include <SFML/Network.hpp> // NOLINT #include <SFML/Network.hpp> // NOLINT
#if defined(HAVE_WX) && HAVE_WX
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <wx/arrstr.h>
#endif
#if defined(HAVE_XRANDR) && HAVE_XRANDR #if defined(HAVE_XRANDR) && HAVE_XRANDR
#include <X11/extensions/Xrandr.h> #include <X11/extensions/Xrandr.h>
#endif #endif
@ -33,10 +27,8 @@
namespace X11Utils namespace X11Utils
{ {
bool ToggleFullscreen(Display* dpy, Window win); bool ToggleFullscreen(Display* dpy, Window win);
#if defined(HAVE_WX) && HAVE_WX
Window XWindowFromHandle(void* Handle); Window XWindowFromHandle(void* Handle);
Display* XDisplayFromHandle(void* Handle); Display* XDisplayFromHandle(void* Handle);
#endif
void InhibitScreensaver(Display* dpy, Window win, bool suspend); void InhibitScreensaver(Display* dpy, Window win, bool suspend);