From 4773bcf0ead441ca3dde989616ade79a7a2ff087 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Mon, 15 Dec 2014 19:14:30 +0100 Subject: [PATCH] cmake: s/_LINUX/__linux__/ --- plugins/GSdx/CMakeLists.txt | 1 - plugins/GSdx/GS.cpp | 10 +++++----- plugins/GSdx/GSDevice.cpp | 2 +- plugins/GSdx/GSDevice.h | 2 +- plugins/GSdx/GSRenderer.cpp | 4 ++-- plugins/GSdx/GSWndEGL.cpp | 2 +- plugins/GSdx/GSWndEGL.h | 2 +- plugins/GSdx/GSWndOGL.cpp | 2 +- plugins/GSdx/GSWndOGL.h | 2 +- plugins/GSdx/GSdx.cpp | 2 +- plugins/GSdx/GSdx.h | 4 ++-- 11 files changed, 16 insertions(+), 17 deletions(-) diff --git a/plugins/GSdx/CMakeLists.txt b/plugins/GSdx/CMakeLists.txt index c8fe9e0e2d..0c56aa8bc9 100644 --- a/plugins/GSdx/CMakeLists.txt +++ b/plugins/GSdx/CMakeLists.txt @@ -10,7 +10,6 @@ endif() set(Output GSdx-0.1.16) set(CommonFlags - -D_LINUX -fno-operator-names # because Xbyak uses and()/xor()/or()/not() function -mfpmath=sse #-Wstrict-aliasing # Allow to track strict aliasing issue. diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index cb36a03226..92239be07c 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -319,7 +319,7 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1) int w = theApp.GetConfig("ModeWidth", 0); int h = theApp.GetConfig("ModeHeight", 0); -#ifdef _LINUX +#ifdef __linux__ for(uint32 i = 0; i < 2; i++) { try { @@ -362,7 +362,7 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1) { s_gs->SetMultithreaded(true); -#ifdef _LINUX +#ifdef __linux__ if (s_gs->m_wnd) { // A window was already attached to s_gs so we also // need to restore the window state (Attach) @@ -415,7 +415,7 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1) EXPORT_C_(int) GSopen2(void** dsp, uint32 flags) { -#ifdef _LINUX +#ifdef __linux__ // Use ogl renderer as default otherwise it crash at startup // GSRenderOGL only GSDeviceOGL (not GSDeviceNULL) int renderer = theApp.GetConfig("renderer", 12); @@ -440,7 +440,7 @@ EXPORT_C_(int) GSopen2(void** dsp, uint32 flags) } #endif -#ifdef _LINUX +#ifdef __linux__ switch(renderer) { case 13: renderer = 12; break; // OGL: SW to HW case 12: renderer = 13; break; // OGL: HW to SW @@ -1419,7 +1419,7 @@ EXPORT_C GSBenchmark(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow #endif -#ifdef _LINUX +#ifdef __linux__ #include #include // ftime(), struct timeb diff --git a/plugins/GSdx/GSDevice.cpp b/plugins/GSdx/GSDevice.cpp index 2354ebf6cb..43cad330a1 100644 --- a/plugins/GSdx/GSDevice.cpp +++ b/plugins/GSdx/GSDevice.cpp @@ -413,6 +413,6 @@ GSAdapter::GSAdapter(const D3DADAPTER_IDENTIFIER9 &desc_d3d9) { } #endif -#ifdef _LINUX +#ifdef __linux__ // TODO #endif diff --git a/plugins/GSdx/GSDevice.h b/plugins/GSdx/GSDevice.h index 93f560b206..115824e1a3 100644 --- a/plugins/GSdx/GSDevice.h +++ b/plugins/GSdx/GSDevice.h @@ -193,7 +193,7 @@ struct GSAdapter GSAdapter(const DXGI_ADAPTER_DESC1 &desc_dxgi); GSAdapter(const D3DADAPTER_IDENTIFIER9 &desc_d3d9); #endif -#ifdef _LINUX +#ifdef __linux__ // TODO #endif }; diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index d38744d5a1..876ba5fea4 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -21,7 +21,7 @@ #include "stdafx.h" #include "GSRenderer.h" -#ifdef _LINUX +#ifdef __linux__ #include #endif @@ -583,7 +583,7 @@ void GSRenderer::KeyEvent(GSKeyEventData* e) } } -#elif defined(_LINUX) +#elif defined(__linux__) if(e->type == KEYPRESS) { int step = m_shift_key ? -1 : 1; diff --git a/plugins/GSdx/GSWndEGL.cpp b/plugins/GSdx/GSWndEGL.cpp index 302eafa65c..491f34f741 100644 --- a/plugins/GSdx/GSWndEGL.cpp +++ b/plugins/GSdx/GSWndEGL.cpp @@ -22,7 +22,7 @@ #include "stdafx.h" #include "GSWndEGL.h" -#if defined(_LINUX) +#if defined(__linux__) GSWndEGL::GSWndEGL() : m_NativeWindow(0), m_NativeDisplay(NULL) diff --git a/plugins/GSdx/GSWndEGL.h b/plugins/GSdx/GSWndEGL.h index 6010dbe7bd..c5a2573724 100644 --- a/plugins/GSdx/GSWndEGL.h +++ b/plugins/GSdx/GSWndEGL.h @@ -21,7 +21,7 @@ #include "GSWnd.h" -#if defined(_LINUX) +#if defined(__linux__) #include #include #include diff --git a/plugins/GSdx/GSWndOGL.cpp b/plugins/GSdx/GSWndOGL.cpp index 3a21bd83e4..b1881acb42 100644 --- a/plugins/GSdx/GSWndOGL.cpp +++ b/plugins/GSdx/GSWndOGL.cpp @@ -22,7 +22,7 @@ #include "stdafx.h" #include "GSWndOGL.h" -#if defined(_LINUX) && !defined(ENABLE_GLES) +#if defined(__linux__) && !defined(ENABLE_GLES) GSWndOGL::GSWndOGL() : m_NativeWindow(0), m_NativeDisplay(NULL), m_swapinterval(NULL) { diff --git a/plugins/GSdx/GSWndOGL.h b/plugins/GSdx/GSWndOGL.h index d25a007408..ab832be250 100644 --- a/plugins/GSdx/GSWndOGL.h +++ b/plugins/GSdx/GSWndOGL.h @@ -21,7 +21,7 @@ #include "GSWnd.h" -#if defined(_LINUX) && !defined(ENABLE_GLES) +#if defined(__linux__) && !defined(ENABLE_GLES) #include #include diff --git a/plugins/GSdx/GSdx.cpp b/plugins/GSdx/GSdx.cpp index b2e9bc6fb8..d53d70b018 100644 --- a/plugins/GSdx/GSdx.cpp +++ b/plugins/GSdx/GSdx.cpp @@ -194,7 +194,7 @@ GSdxApp::GSdxApp() m_gpu_scale.push_back(GSSetting(2 | (2 << 2), "H x 4 - V x 4", "")); } -#ifdef _LINUX +#ifdef __linux__ void GSdxApp::ReloadConfig() { if (m_configuration_map.empty()) return; diff --git a/plugins/GSdx/GSdx.h b/plugins/GSdx/GSdx.h index 5ccb1e2c69..5b65716813 100644 --- a/plugins/GSdx/GSdx.h +++ b/plugins/GSdx/GSdx.h @@ -27,7 +27,7 @@ class GSdxApp { std::string m_ini; std::string m_section; -#ifdef _LINUX +#ifdef __linux__ std::map< std::string, std::string > m_configuration_map; #endif @@ -40,7 +40,7 @@ public: HMODULE GetModuleHandle() {return (HMODULE)GetModuleHandlePtr();} #endif -#ifdef _LINUX +#ifdef __linux__ void BuildConfigurationMap(const char* lpFileName); void ReloadConfig();