From fcfb8ffdd5af7549e20f91b0b21a88ce31ed0148 Mon Sep 17 00:00:00 2001 From: nakeee Date: Sun, 7 Dec 2008 17:09:40 +0000 Subject: [PATCH] some scons fixes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1425 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/BootManager.cpp | 16 ++++++++-------- Source/Core/DolphinWX/Src/Globals.h | 5 +++-- Source/Core/DolphinWX/Src/ISOFile.cpp | 2 +- Source/Core/DolphinWX/Src/ISOFile.h | 4 ++-- Source/Core/DolphinWX/Src/MainNoGUI.cpp | 2 +- .../Plugins/Plugin_PadSimple/Src/PadSimple.cpp | 16 +++++++++------- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 4 ++-- 7 files changed, 26 insertions(+), 23 deletions(-) diff --git a/Source/Core/DolphinWX/Src/BootManager.cpp b/Source/Core/DolphinWX/Src/BootManager.cpp index 145dbe5dee..fdd84a6d16 100644 --- a/Source/Core/DolphinWX/Src/BootManager.cpp +++ b/Source/Core/DolphinWX/Src/BootManager.cpp @@ -28,7 +28,7 @@ #include "Config.h" #include "ConfigMain.h" #include "Core.h" -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX #include "Frame.h" #include "CodeWindow.h" #endif @@ -37,7 +37,7 @@ static std::string s_DataBasePath_EUR = "Data_EUR"; static std::string s_DataBasePath_USA = "Data_USA"; static std::string s_DataBasePath_JAP = "Data_JAP"; -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX extern CFrame* main_frame; extern CCodeWindow* g_pCodeWindow; #endif @@ -52,7 +52,7 @@ bool BootCore(const std::string& _rFilename) { SCoreStartupParameter StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter; -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX if (g_pCodeWindow) { // StartUp.bUseDualCore = code_frame->UseDualCore(); @@ -63,15 +63,15 @@ bool BootCore(const std::string& _rFilename) // StartUp.bUseDualCore = false; // StartUp.bUseJIT = true; } -#endif //osx 64 +#endif StartUp.m_BootType = SCoreStartupParameter::BOOT_ISO; StartUp.m_strFilename = _rFilename; SConfig::GetInstance().m_LastFilename = StartUp.m_strFilename; StartUp.bRunCompareClient = false; StartUp.bRunCompareServer = false; -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX StartUp.bEnableDebugging = g_pCodeWindow ? true : false; // RUNNING_DEBUG -#endif //osx 64 +#endif std::string BaseDataPath; #ifdef _WIN32 StartUp.hInstance = wxGetInstance(); @@ -150,7 +150,7 @@ bool BootCore(const std::string& _rFilename) // --------- } // --------- -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX if(main_frame) StartUp.hMainWindow = main_frame->GetRenderHandle(); #endif @@ -161,7 +161,7 @@ bool BootCore(const std::string& _rFilename) return(false); } -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX Core::SetState(g_pCodeWindow ? Core::CORE_PAUSE : Core::CORE_RUN); #else Core::SetState(Core::CORE_RUN); diff --git a/Source/Core/DolphinWX/Src/Globals.h b/Source/Core/DolphinWX/Src/Globals.h index edaa2af118..db80cf7f3b 100644 --- a/Source/Core/DolphinWX/Src/Globals.h +++ b/Source/Core/DolphinWX/Src/Globals.h @@ -18,6 +18,7 @@ #ifndef _GLOBALS_H #define _GLOBALS_H +#include "Common.h" enum { IDM_LOADSTATE = 200, @@ -87,7 +88,7 @@ enum //#include //#ifndef WX_PRECOMP -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX #include //#endif @@ -127,5 +128,5 @@ enum ), extern const wxEventType wxEVT_HOST_COMMAND; -#endif //apple 64bit +#endif #endif diff --git a/Source/Core/DolphinWX/Src/ISOFile.cpp b/Source/Core/DolphinWX/Src/ISOFile.cpp index 843ec5c51f..deb7e21abf 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.cpp +++ b/Source/Core/DolphinWX/Src/ISOFile.cpp @@ -114,7 +114,7 @@ GameListItem::GameListItem(const std::string& _rFileName) // i am not sure if this is a leak or if wxImage will release the code if (m_pImage) { -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX m_Image.Create(DVD_BANNER_WIDTH, DVD_BANNER_HEIGHT, m_pImage); #endif } diff --git a/Source/Core/DolphinWX/Src/ISOFile.h b/Source/Core/DolphinWX/Src/ISOFile.h index c6f49cf60c..038ad87828 100644 --- a/Source/Core/DolphinWX/Src/ISOFile.h +++ b/Source/Core/DolphinWX/Src/ISOFile.h @@ -37,7 +37,7 @@ public: bool IsCompressed() const {return m_BlobCompressed;} u64 GetFileSize() const {return m_FileSize;} u64 GetVolumeSize() const {return m_VolumeSize;} -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX const wxImage& GetImage() const {return m_Image;} #endif @@ -55,7 +55,7 @@ private: DiscIO::IVolume::ECountry m_Country; -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX wxImage m_Image; #endif bool m_Valid; diff --git a/Source/Core/DolphinWX/Src/MainNoGUI.cpp b/Source/Core/DolphinWX/Src/MainNoGUI.cpp index 44f28493f7..bd0c6c9490 100644 --- a/Source/Core/DolphinWX/Src/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/Src/MainNoGUI.cpp @@ -80,7 +80,7 @@ void Host_SysMessage(const char *fmt, ...) void Host_SetWiiMoteConnectionState(int _State) {} // Include SDL header so it can hijack main(). -#if !defined(OSX64) +#if defined(USE_SDL) && USE_SDL #include #endif int main(int argc, char* argv[]) diff --git a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp index fa6262fec4..fe6731a735 100644 --- a/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp +++ b/Source/Plugins/Plugin_PadSimple/Src/PadSimple.cpp @@ -23,7 +23,7 @@ #include "PadSimple.h" #include "IniFile.h" -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX #include "GUI/ConfigDlg.h" #endif @@ -32,8 +32,10 @@ #include "DirectInputBase.h" DInput dinput; +//#elif defined(USE_SDL) && USE_SDL +//#include -#else +#elif defined(HAVE_X11) && HAVE_X11 #include #include @@ -166,7 +168,7 @@ void DllConfig(HWND _hParent) ConfigDialog frame(&win); frame.ShowModal(); win.SetHWND(0); -#elif !defined(OSX64) +#elif defined(HAVE_WX) && HAVE_WX ConfigDialog frame(NULL); frame.ShowModal(); #endif @@ -183,7 +185,7 @@ void PAD_Initialize(SPADInitialize _PADInitialize) g_PADInitialize = _PADInitialize; #ifdef _WIN32 dinput.Init((HWND)g_PADInitialize.hWnd); -#else +#elif defined(HAVE_X11) && HAVE_X11 GXdsp = (Display*)g_PADInitialize.hWnd; XkbSetDetectableAutoRepeat(GXdsp, True, NULL); #endif @@ -351,7 +353,7 @@ bool XInput_Read(int XPadPlayer, SPADStatus* _pPADStatus) } #endif -#if defined(__linux__) +#if defined(HAVE_X11) && HAVE_X11 // The graphics plugin in the PCSX2 design leaves a lot of the window processing to the pad plugin, weirdly enough. void X11_Read(int _numPAD, SPADStatus* _pPADStatus) { @@ -504,7 +506,7 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus) _pPADStatus->err = PAD_ERR_NONE; if (pad[_numPAD].bEnableXPad) XInput_Read(pad[_numPAD].XPadPlayer, _pPADStatus); DInput_Read(_numPAD, _pPADStatus); -#elif defined(__linux__) +#elif defined(HAVE_X11) && HAVE_X11 _pPADStatus->err = PAD_ERR_NONE; X11_Read(_numPAD, _pPADStatus); #endif @@ -645,7 +647,7 @@ void LoadConfig() { file.Get(SectionName, controlNames[x], &pad[i].keyForControl[x], (i==0)?defaultKeyForControl[x]:0); -#ifndef _WIN32 +#if defined(HAVE_X11) && HAVE_X11 // In linux we have a problem assigning the upper case of the // keys because they're not being recognized pad[i].keyForControl[x] = tolower(pad[i].keyForControl[x]); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 32848828ca..92629cd40f 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -48,7 +48,7 @@ #include "TextureConverter.h" #include "VideoState.h" -#if HAVE_WX || defined __WXMSW__ +#if defined(HAVE_WX) && HAVE_WX #include "Debugger/Debugger.h" // for the CDebugger class #endif SVideoInitialize g_VideoInitialize; @@ -60,7 +60,7 @@ SVideoInitialize g_VideoInitialize; for the purpose of the game. At that point there is no need to use the same dll instance as the one that is rendering the game. However, that could be done. */ -#if HAVE_WX || defined __WXMSW__ +#if defined(HAVE_WX) && HAVE_WX CDebugger* m_frame; void DllDebugger(HWND _hParent, bool Show) {