diff --git a/SConstruct b/SConstruct index 9566d04261..93079624f6 100644 --- a/SConstruct +++ b/SConstruct @@ -158,10 +158,6 @@ if env['lint']: # add the warnings to the compile flags compileFlags += [ '-W' + warning for warning in warnings ] -# Handle the compilers -CC = env['CC'], -CXX = env['CXX'], - env['CCFLAGS'] = compileFlags env['CXXFLAGS'] = compileFlags + [ '-fvisibility-inlines-hidden' ] env['CPPDEFINES'] = cppDefines diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index 4f1ae2f1dc..f3e94abdb5 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -80,7 +80,7 @@ void OpenGL_SetWindowText(const char *text) cocoaGLSetTitle(); #elif defined(_WIN32) SetWindowText(EmuWindow::GetWnd(), text); -#else // GLX +#elif defined(HAVE_X11) && HAVE_X11 // GLX /** * Tell X to ask the window manager to set the window title. (X * itself doesn't provide window title functionality.) @@ -95,15 +95,7 @@ unsigned int Callback_PeekMessages() BOOL Callback_PeekMessages() #endif { -#if USE_SDL - // TODO: There is no documentation of this function and the calling code - // ignores the return value, so I have no idea what would be the - // proper value to return. - return FALSE; -#elif defined(OSX64) - //TODO - return FALSE; -#elif defined(_WIN32) +#ifdef _WIN32 //TODO: peekmessage MSG msg; while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) @@ -114,9 +106,7 @@ BOOL Callback_PeekMessages() DispatchMessage(&msg); } return TRUE; -#else // GLX - // This is called from Outside of our video thread, from EmuThread - // The calls are NOT thread safe, so it breaks everything +#else return FALSE; #endif } @@ -329,7 +319,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight return false; } -#else // GLX +#elif defined(HAVE_X11) && HAVE_X11 XVisualInfo *vi; Colormap cmap; int dpyWidth, dpyHeight; @@ -689,7 +679,8 @@ void OpenGL_Shutdown() { if (!wglMakeCurrent(NULL,NULL)) // Are We Able To Release The DC And RC Contexts? { - // [F|RES]: if this fails i dont see the message box and cant get out of the modal state + // [F|RES]: if this fails i dont see the message box and + cant get out of the modal state // so i disable it. This function fails only if i render to main window // MessageBox(NULL,"Release Of DC And RC Failed.", "SHUTDOWN ERROR", MB_OK | MB_ICONINFORMATION); } @@ -706,7 +697,7 @@ void OpenGL_Shutdown() MessageBox(NULL,"Release Device Context Failed.", "SHUTDOWN ERROR", MB_OK | MB_ICONINFORMATION); hDC = NULL; // Set DC To NULL } -#else // GLX +#elif defined(HAVE_X11) && HAVE_X11 if (GLWin.ctx) { if (!glXMakeCurrent(GLWin.dpy, None, NULL)) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h index e85859d2b7..62b377f825 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h @@ -34,7 +34,7 @@ #define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0])) #define I_NEED_OS2_H // HAXXOR //#include -#if !defined(OSX64) +#if defined(HAVE_X11) && HAVE_X11 #include #else #undef BOOL diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp index 9a6d09c87a..f41f9066e2 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp @@ -15,7 +15,7 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX #include #include #include diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp index 212cd513cb..789dd1ef77 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp @@ -33,7 +33,7 @@ #endif -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX #include "../Debugger/Debugger.h" // for the CDebugger class #include "../Debugger/PBView.h" #include "Console.h" // open and close console, clear console window @@ -72,7 +72,7 @@ std::vector viupd(15); // the length of the update frequency bar // --------------------------------------------------------------------------------------- // Classes // ------------- -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX extern CDebugger* m_frame; #endif @@ -145,7 +145,7 @@ void Logging(int a) { std::string sfbuff; sfbuff = sfbuff + writeMessage(ii, 0); -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX aprintf(ii, (char *)sfbuff.c_str()); #endif } @@ -258,7 +258,7 @@ void Logging(int a) // ======================================================================================= // Print // ---------------- -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX ClearScreen(); #endif __Log("%s", sbuff.c_str()); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 67406924be..98c822170f 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -42,7 +42,7 @@ #include "VertexLoaderManager.h" #include "VertexLoader.h" #include "XFB.h" -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX #include "Debugger/Debugger.h" // for the CDebugger class #endif #include "Logging/Logging.h" // for Logging() @@ -63,7 +63,7 @@ struct MESSAGE CGcontext g_cgcontext; CGprofile g_cgvProf, g_cgfProf; -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX extern CDebugger* m_frame; // the debugging class #endif @@ -852,7 +852,7 @@ void Renderer::SwapBuffers() } // Write logging data to debugger -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX if(m_frame) { Logging(0); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 92629cd40f..4bba72be15 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -25,7 +25,7 @@ #include #endif -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX #include "GUI/ConfigDlg.h" #endif @@ -154,7 +154,7 @@ void DllConfig(HWND _hParent) frame->ShowModal(); //win.SetHWND(0); -#elif defined(__linux__) +#elif defined(HAVE_WX) && HAVE_WX ConfigDialog frame(NULL); g_Config.Load(); int glxMajorVersion, glxMinorVersion; diff --git a/Source/Plugins/Plugin_Wiimote/Src/main.cpp b/Source/Plugins/Plugin_Wiimote/Src/main.cpp index fb300cfbcc..250a587918 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/main.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/main.cpp @@ -16,15 +16,15 @@ // http://code.google.com/p/dolphin-emu/ -#if !defined(OSX64) -#include -#include "ConfigDlg.h" -#endif - #include "Common.h" #include "Config.h" #include "StringUtil.h" +#if defined(HAVE_WX) && HAVE_WX +#include +#include "ConfigDlg.h" +#endif + #include "pluginspecs_wiimote.h" #include "EmuMain.h" @@ -102,7 +102,7 @@ extern "C" void GetDllInfo (PLUGIN_INFO* _PluginInfo) extern "C" void DllAbout(HWND _hParent) { -#if !defined(OSX64) +#if defined(HAVE_WX) && HAVE_WX wxAboutDialogInfo info; info.SetName(_T("Wiimote plug-in")); info.AddDeveloper(_T("masken (masken3@gmail.com)"));