From 0f11838d93f8c8bcc26920216975d6b1d8632f49 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Wed, 27 Jan 2016 15:33:10 +0000 Subject: [PATCH] gsdx: s/_WINDOWS/_WIN32/ It's the proper Windows preprocessor macro. --- plugins/GSdx/GLLoader.cpp | 2 +- plugins/GSdx/GPU.cpp | 10 +++++----- plugins/GSdx/GPURenderer.cpp | 12 ++++++------ plugins/GSdx/GPURenderer.h | 4 ++-- plugins/GSdx/GS.cpp | 26 +++++++++++++------------- plugins/GSdx/GS.h | 2 +- plugins/GSdx/GSCapture.cpp | 8 ++++---- plugins/GSdx/GSCapture.h | 4 ++-- plugins/GSdx/GSDevice.cpp | 2 +- plugins/GSdx/GSDevice.h | 2 +- plugins/GSdx/GSRenderer.cpp | 6 +++--- plugins/GSdx/GSTextureOGL.cpp | 2 +- plugins/GSdx/GSTextureSW.cpp | 2 +- plugins/GSdx/GSThread.cpp | 8 ++++---- plugins/GSdx/GSUtil.cpp | 6 +++--- plugins/GSdx/GSUtil.h | 2 +- plugins/GSdx/GSVector.h | 2 +- plugins/GSdx/GSWndDX.cpp | 2 +- plugins/GSdx/GSWndDX.h | 2 +- plugins/GSdx/GSWndWGL.cpp | 2 +- plugins/GSdx/GSWndWGL.h | 2 +- plugins/GSdx/GSdx.cpp | 4 ++-- plugins/GSdx/GSdx.h | 2 +- plugins/GSdx/config.h | 2 +- plugins/GSdx/stdafx.cpp | 2 +- plugins/GSdx/stdafx.h | 12 ++++++------ 26 files changed, 65 insertions(+), 65 deletions(-) diff --git a/plugins/GSdx/GLLoader.cpp b/plugins/GSdx/GLLoader.cpp index f47469cf1a..4f243376ed 100644 --- a/plugins/GSdx/GLLoader.cpp +++ b/plugins/GSdx/GLLoader.cpp @@ -495,7 +495,7 @@ namespace GLLoader { theApp.SetConfig("accurate_date", 0); } -#ifdef _WINDOWS +#ifdef _WIN32 if (status) { if (intel_buggy_driver) { fprintf(stderr, "OpenGL renderer isn't compatible with SandyBridge/IvyBridge GPU due to issues. Sorry.\n" diff --git a/plugins/GSdx/GPU.cpp b/plugins/GSdx/GPU.cpp index 66b360926c..3cb212d336 100644 --- a/plugins/GSdx/GPU.cpp +++ b/plugins/GSdx/GPU.cpp @@ -25,7 +25,7 @@ #include "GPURendererSW.h" #include "GSDeviceNull.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include "GPUSettingsDlg.h" #include "GSDevice9.h" @@ -73,7 +73,7 @@ EXPORT_C_(int32) GPUclose() s_gpu = NULL; -#ifdef _WINDOWS +#ifdef _WIN32 if(SUCCEEDED(s_hr)) { @@ -96,7 +96,7 @@ EXPORT_C_(int32) GPUopen(void* hWnd) return -1; } -#ifdef _WINDOWS +#ifdef _WIN32 s_hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); @@ -113,7 +113,7 @@ EXPORT_C_(int32) GPUopen(void* hWnd) switch(renderer) { default: - #ifdef _WINDOWS + #ifdef _WIN32 case 0: s_gpu = new GPURendererSW(new GSDevice9(), threads); break; case 1: s_gpu = new GPURendererSW(new GSDevice11(), threads); break; #endif @@ -133,7 +133,7 @@ EXPORT_C_(int32) GPUopen(void* hWnd) EXPORT_C_(int32) GPUconfigure() { -#ifdef _WINDOWS +#ifdef _WIN32 GPUSettingsDlg dlg; diff --git a/plugins/GSdx/GPURenderer.cpp b/plugins/GSdx/GPURenderer.cpp index 70062991c0..32338c5efb 100644 --- a/plugins/GSdx/GPURenderer.cpp +++ b/plugins/GSdx/GPURenderer.cpp @@ -23,7 +23,7 @@ #include "GPURenderer.h" #include "GSdx.h" -#ifdef _WINDOWS +#ifdef _WIN32 map GPURenderer::m_wnd2gpu; @@ -41,7 +41,7 @@ GPURenderer::GPURenderer(GSDevice* dev) m_scale = m_mem.GetScale(); m_shadeboost = !!theApp.GetConfig("ShadeBoost", 0); - #ifdef _WINDOWS + #ifdef _WIN32 m_hWnd = NULL; m_wndproc = NULL; @@ -53,7 +53,7 @@ GPURenderer::GPURenderer(GSDevice* dev) GPURenderer::~GPURenderer() { - #ifdef _WINDOWS + #ifdef _WIN32 if(m_wndproc) { @@ -67,7 +67,7 @@ GPURenderer::~GPURenderer() bool GPURenderer::Create(void* hWnd) { - #ifdef _WINDOWS + #ifdef _WIN32 // TODO: move subclassing inside GSWnd::Attach @@ -147,7 +147,7 @@ void GPURenderer::VSync() // m_env.STATUS.LCF = ~m_env.STATUS.LCF; // ? - #ifdef _WINDOWS + #ifdef _WIN32 if(!IsWindow(m_hWnd)) return; @@ -224,7 +224,7 @@ bool GPURenderer::MakeSnapshot(const string& path) return false; } -#ifdef _WINDOWS +#ifdef _WIN32 LRESULT CALLBACK GPURenderer::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { diff --git a/plugins/GSdx/GPURenderer.h b/plugins/GSdx/GPURenderer.h index 3d92a2a89a..74fb9b2e7d 100644 --- a/plugins/GSdx/GPURenderer.h +++ b/plugins/GSdx/GPURenderer.h @@ -24,7 +24,7 @@ #include "GPUState.h" #include "GSVertexList.h" #include "GSDevice.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include "GSWndDX.h" #endif @@ -46,7 +46,7 @@ protected: virtual void ResetDevice() {} virtual GSTexture* GetOutput() = 0; - #ifdef _WINDOWS + #ifdef _WIN32 HWND m_hWnd; WNDPROC m_wndproc; diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index eaf33e7614..640f7f063e 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -29,7 +29,7 @@ #include "GSRendererOGL.h" #include "GSRendererCL.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include "GSRendererDX9.h" #include "GSRendererDX11.h" @@ -123,7 +123,7 @@ EXPORT_C_(int) GSinit() return -1; } -#ifdef _WINDOWS +#ifdef _WIN32 s_hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); @@ -147,7 +147,7 @@ EXPORT_C GSshutdown() s_renderer = GSRendererType::Undefined; -#ifdef _WINDOWS +#ifdef _WIN32 if(SUCCEEDED(s_hr)) { @@ -238,7 +238,7 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t switch (renderer) { default: -#ifdef _WINDOWS +#ifdef _WIN32 case GSRendererType::DX9_HW: case GSRendererType::DX9_SW: case GSRendererType::DX9_Null: @@ -285,7 +285,7 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t switch (renderer) { default: -#ifdef _WINDOWS +#ifdef _WIN32 case GSRendererType::DX9_HW: s_gs = (GSRenderer*)new GSRendererDX9(); s_renderer_type = " HW"; @@ -332,7 +332,7 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t if (s_gs->m_wnd == NULL) { -#ifdef _WINDOWS +#ifdef _WIN32 switch (renderer) { case GSRendererType::OGL_HW: @@ -403,7 +403,7 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t return -1; } #endif -#ifdef _WINDOWS +#ifdef _WIN32 if(!s_gs->CreateWnd(title, w, h)) { GSclose(); @@ -448,7 +448,7 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t } } #endif -#ifdef _WINDOWS +#ifdef _WIN32 try { s_gs->m_wnd->Attach(*dsp, false); @@ -563,7 +563,7 @@ EXPORT_C_(int) GSopen(void** dsp, const char* title, int mt) { // pcsx2 sent a switch renderer request -#ifdef _WINDOWS +#ifdef _WIN32 renderer = GSUtil::CheckDirect3D11Level() >= D3D_FEATURE_LEVEL_10_0 ? GSRendererType::DX1011_SW : GSRendererType::DX9_SW; @@ -719,7 +719,7 @@ EXPORT_C GSvsync(int field) { try { -#ifdef _WINDOWS +#ifdef _WIN32 if(s_gs->m_wnd->IsManaged()) { @@ -806,7 +806,7 @@ EXPORT_C GSconfigure() { if(!GSUtil::CheckSSE()) return; -#ifdef _WINDOWS +#ifdef _WIN32 GSDialog::InitCommonControls(); if(GSSettingsDlg().DoModal() == IDOK) { @@ -842,7 +842,7 @@ EXPORT_C_(int) GStest() return -1; } -#ifdef _WINDOWS +#ifdef _WIN32 s_hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); @@ -993,7 +993,7 @@ EXPORT_C GSsetFrameLimit(int limit) } } -#ifdef _WINDOWS +#ifdef _WIN32 #include #include diff --git a/plugins/GSdx/GS.h b/plugins/GSdx/GS.h index 24ee2f4191..1e2acc59ab 100644 --- a/plugins/GSdx/GS.h +++ b/plugins/GSdx/GS.h @@ -239,7 +239,7 @@ enum class GSRendererType : int8_t OGL_SW = 13, OGL_OpenCL = 17, -#ifdef _WINDOWS +#ifdef _WIN32 Default = DX9_HW #else // Use ogl renderer as default otherwise it crash at startup diff --git a/plugins/GSdx/GSCapture.cpp b/plugins/GSdx/GSCapture.cpp index 0c451af6c4..809cfd7f42 100644 --- a/plugins/GSdx/GSCapture.cpp +++ b/plugins/GSdx/GSCapture.cpp @@ -24,7 +24,7 @@ #include "GSPng.h" #include "GSUtil.h" -#ifdef _WINDOWS +#ifdef _WIN32 // // GSSource @@ -398,7 +398,7 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recomendedResolution, float a EndCapture(); -#ifdef _WINDOWS +#ifdef _WIN32 GSCaptureDlg dlg; @@ -512,7 +512,7 @@ bool GSCapture::DeliverFrame(const void* bits, int pitch, bool rgba) return false; } -#ifdef _WINDOWS +#ifdef _WIN32 if(m_src) { @@ -538,7 +538,7 @@ bool GSCapture::EndCapture() { std::lock_guard lock(m_lock); -#ifdef _WINDOWS +#ifdef _WIN32 if(m_src) { diff --git a/plugins/GSdx/GSCapture.h b/plugins/GSdx/GSCapture.h index e522da5555..49cbd8f2c1 100644 --- a/plugins/GSdx/GSCapture.h +++ b/plugins/GSdx/GSCapture.h @@ -24,7 +24,7 @@ #include "GSVector.h" #include "GSPng.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include "GSCaptureDlg.h" #endif @@ -37,7 +37,7 @@ class GSCapture std::string m_out_dir; int m_threads; - #ifdef _WINDOWS + #ifdef _WIN32 CComPtr m_graph; CComPtr m_src; diff --git a/plugins/GSdx/GSDevice.cpp b/plugins/GSdx/GSDevice.cpp index 526ef24991..23e01d0fc8 100644 --- a/plugins/GSdx/GSDevice.cpp +++ b/plugins/GSdx/GSDevice.cpp @@ -428,7 +428,7 @@ bool GSAdapter::operator==(const GSAdapter &desc_dxgi) const && rev == desc_dxgi.rev; } -#ifdef _WINDOWS +#ifdef _WIN32 GSAdapter::GSAdapter(const DXGI_ADAPTER_DESC1 &desc_dxgi) : vendor(desc_dxgi.VendorId) , device(desc_dxgi.DeviceId) diff --git a/plugins/GSdx/GSDevice.h b/plugins/GSdx/GSDevice.h index a9f2bd3e71..186d88b751 100644 --- a/plugins/GSdx/GSDevice.h +++ b/plugins/GSdx/GSDevice.h @@ -216,7 +216,7 @@ struct GSAdapter return (std::string)*this == s; } -#ifdef _WINDOWS +#ifdef _WIN32 GSAdapter(const DXGI_ADAPTER_DESC1 &desc_dxgi); GSAdapter(const D3DADAPTER_IDENTIFIER9 &desc_d3d9); #endif diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index 56e49e08bf..6c6efcc3e1 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -444,7 +444,7 @@ void GSRenderer::VSync(int field) { bool shift = false; - #ifdef _WINDOWS + #ifdef _WIN32 shift = !!(::GetAsyncKeyState(VK_SHIFT) & 0x8000); @@ -481,7 +481,7 @@ void GSRenderer::VSync(int field) { bool control = false; - #ifdef _WINDOWS + #ifdef _WIN32 control = !!(::GetAsyncKeyState(VK_CONTROL) & 0x8000); @@ -552,7 +552,7 @@ void GSRenderer::EndCapture() void GSRenderer::KeyEvent(GSKeyEventData* e) { -#ifdef _WINDOWS +#ifdef _WIN32 if(e->type == KEYPRESS) { diff --git a/plugins/GSdx/GSTextureOGL.cpp b/plugins/GSdx/GSTextureOGL.cpp index 6968fce4cd..c1fefd4b42 100644 --- a/plugins/GSdx/GSTextureOGL.cpp +++ b/plugins/GSdx/GSTextureOGL.cpp @@ -421,7 +421,7 @@ void GSTextureOGL::Unmap() { } -#ifndef _WINDOWS +#ifndef _WIN32 #pragma pack(push, 1) diff --git a/plugins/GSdx/GSTextureSW.cpp b/plugins/GSdx/GSTextureSW.cpp index a2b4b726e2..8f9f712412 100644 --- a/plugins/GSdx/GSTextureSW.cpp +++ b/plugins/GSdx/GSTextureSW.cpp @@ -85,7 +85,7 @@ void GSTextureSW::Unmap() m_mapped = 0; } -#ifndef _WINDOWS +#ifndef _WIN32 #pragma pack(push, 1) diff --git a/plugins/GSdx/GSThread.cpp b/plugins/GSdx/GSThread.cpp index 36773bcec4..860b7384f2 100644 --- a/plugins/GSdx/GSThread.cpp +++ b/plugins/GSdx/GSThread.cpp @@ -24,7 +24,7 @@ GSThread::GSThread() { - #ifdef _WINDOWS + #ifdef _WIN32 m_ThreadId = 0; m_hThread = NULL; @@ -39,7 +39,7 @@ GSThread::~GSThread() CloseThread(); } -#ifdef _WINDOWS +#ifdef _WIN32 DWORD WINAPI GSThread::StaticThreadProc(void* lpParam) { @@ -63,7 +63,7 @@ void* GSThread::StaticThreadProc(void* param) void GSThread::CreateThread() { - #ifdef _WINDOWS + #ifdef _WIN32 m_hThread = ::CreateThread(NULL, 0, StaticThreadProc, (void*)this, 0, &m_ThreadId); @@ -81,7 +81,7 @@ void GSThread::CreateThread() void GSThread::CloseThread() { - #ifdef _WINDOWS + #ifdef _WIN32 if(m_hThread != NULL) { diff --git a/plugins/GSdx/GSUtil.cpp b/plugins/GSdx/GSUtil.cpp index 47981df925..27e0b9869c 100644 --- a/plugins/GSdx/GSUtil.cpp +++ b/plugins/GSdx/GSUtil.cpp @@ -24,7 +24,7 @@ #include "GSUtil.h" #include "xbyak/xbyak_util.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include "svnrev.h" #else #define SVN_REV 0 @@ -41,7 +41,7 @@ const char* GSUtil::GetLibName() { str = "GSdx"; - #ifdef _WINDOWS + #ifdef _WIN32 str += format(" %lld", SVN_REV); if(SVN_MODS) str += "m"; #endif @@ -320,7 +320,7 @@ string GSUtil::GetDeviceUniqueName(cl::Device& device) } #endif -#ifdef _WINDOWS +#ifdef _WIN32 bool GSUtil::CheckDirectX() { diff --git a/plugins/GSdx/GSUtil.h b/plugins/GSdx/GSUtil.h index 61182addaf..f1372775e3 100644 --- a/plugins/GSdx/GSUtil.h +++ b/plugins/GSdx/GSUtil.h @@ -55,7 +55,7 @@ public: static string GetDeviceUniqueName(cl::Device& device); #endif -#ifdef _WINDOWS +#ifdef _WIN32 static bool CheckDirectX(); static bool CheckDXGI(); diff --git a/plugins/GSdx/GSVector.h b/plugins/GSdx/GSVector.h index cacef41350..c07b951317 100644 --- a/plugins/GSdx/GSVector.h +++ b/plugins/GSdx/GSVector.h @@ -297,7 +297,7 @@ public: GSVector4i fit(int preset) const; - #ifdef _WINDOWS + #ifdef _WIN32 __forceinline operator LPCRECT() const { diff --git a/plugins/GSdx/GSWndDX.cpp b/plugins/GSdx/GSWndDX.cpp index fe4de27128..52750aa350 100644 --- a/plugins/GSdx/GSWndDX.cpp +++ b/plugins/GSdx/GSWndDX.cpp @@ -22,7 +22,7 @@ #include "stdafx.h" #include "GSWndDX.h" -#ifdef _WINDOWS +#ifdef _WIN32 GSWndDX::GSWndDX() : m_hWnd(NULL) , m_frame(true) diff --git a/plugins/GSdx/GSWndDX.h b/plugins/GSdx/GSWndDX.h index 02c5c93dbe..1cc96138e0 100644 --- a/plugins/GSdx/GSWndDX.h +++ b/plugins/GSdx/GSWndDX.h @@ -22,7 +22,7 @@ #include "stdafx.h" #include "GSWnd.h" -#ifdef _WINDOWS +#ifdef _WIN32 class GSWndDX : public GSWnd { HWND m_hWnd; diff --git a/plugins/GSdx/GSWndWGL.cpp b/plugins/GSdx/GSWndWGL.cpp index 95bdfe3251..f4e44ab4ed 100644 --- a/plugins/GSdx/GSWndWGL.cpp +++ b/plugins/GSdx/GSWndWGL.cpp @@ -22,7 +22,7 @@ #include "stdafx.h" #include "GSWndWGL.h" -#ifdef _WINDOWS +#ifdef _WIN32 GSWndWGL::GSWndWGL() : m_NativeWindow(NULL), m_NativeDisplay(NULL), m_context(NULL) { diff --git a/plugins/GSdx/GSWndWGL.h b/plugins/GSdx/GSWndWGL.h index 5a8d4b752c..4c477b7c6c 100644 --- a/plugins/GSdx/GSWndWGL.h +++ b/plugins/GSdx/GSWndWGL.h @@ -21,7 +21,7 @@ #include "GSWnd.h" -#ifdef _WINDOWS +#ifdef _WIN32 class GSWndWGL : public GSWndGL { diff --git a/plugins/GSdx/GSdx.cpp b/plugins/GSdx/GSdx.cpp index ca9db7060f..bd2a7ec564 100644 --- a/plugins/GSdx/GSdx.cpp +++ b/plugins/GSdx/GSdx.cpp @@ -25,7 +25,7 @@ static void* s_hModule; -#ifdef _WINDOWS +#ifdef _WIN32 BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { @@ -128,7 +128,7 @@ GSdxApp::GSdxApp() m_ini = "inis/GSdx.ini"; m_section = "Settings"; -#ifdef _WINDOWS +#ifdef _WIN32 m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::OGL_HW), "OpenGL", "Hardware")); m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX1011_HW), "Direct3D11", "Hardware")); m_gs_renderers.push_back(GSSetting(static_cast(GSRendererType::DX9_HW), "Direct3D9", "Hardware")); diff --git a/plugins/GSdx/GSdx.h b/plugins/GSdx/GSdx.h index e9731ea618..5ea4201c4c 100644 --- a/plugins/GSdx/GSdx.h +++ b/plugins/GSdx/GSdx.h @@ -36,7 +36,7 @@ public: void* GetModuleHandlePtr(); -#ifdef _WINDOWS +#ifdef _WIN32 HMODULE GetModuleHandle() {return (HMODULE)GetModuleHandlePtr();} #endif diff --git a/plugins/GSdx/config.h b/plugins/GSdx/config.h index 830952065f..11a8f18ca3 100644 --- a/plugins/GSdx/config.h +++ b/plugins/GSdx/config.h @@ -49,7 +49,7 @@ #define DISABLE_PERF_MON // Burn cycle for nothing in release mode #endif -#ifdef _WINDOWS +#ifdef _WIN32 //#define ENABLE_OPENCL #endif diff --git a/plugins/GSdx/stdafx.cpp b/plugins/GSdx/stdafx.cpp index 1de67d15c1..b36ceb77cb 100644 --- a/plugins/GSdx/stdafx.cpp +++ b/plugins/GSdx/stdafx.cpp @@ -59,7 +59,7 @@ string format(const char* fmt, ...) return s; } -#ifdef _WINDOWS +#ifdef _WIN32 void* vmalloc(size_t size, bool code) { diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index e9c49a5c40..082aa4440a 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -27,7 +27,7 @@ #include "config.h" -#ifdef _WINDOWS +#ifdef _WIN32 #include "targetver.h" @@ -109,7 +109,7 @@ using namespace std; #include -#if _MSC_VER >= 1800 || !defined(_WINDOWS) +#if _MSC_VER >= 1800 || !defined(_WIN32) #include #include #define hash_map unordered_map @@ -120,7 +120,7 @@ using namespace std; using namespace stdext; #endif -#ifdef _WINDOWS +#ifdef _WIN32 // Note use GL/glcorearb.h on the future #include @@ -306,7 +306,7 @@ struct aligned_free_second {template void operator()(T& p) {_aligned_fr #endif -#if !defined(_M_SSE) && (!defined(_WINDOWS) || defined(_M_AMD64) || defined(_M_IX86_FP) && _M_IX86_FP >= 2) +#if !defined(_M_SSE) && (!defined(_WIN32) || defined(_M_AMD64) || defined(_M_IX86_FP) && _M_IX86_FP >= 2) #define _M_SSE 0x200 @@ -487,7 +487,7 @@ struct aligned_free_second {template void operator()(T& p) {_aligned_fr extern void* vmalloc(size_t size, bool code); extern void vmfree(void* ptr, size_t size); -#ifdef _WINDOWS +#ifdef _WIN32 #ifdef ENABLE_VTUNE @@ -522,7 +522,7 @@ extern void vmfree(void* ptr, size_t size); #endif // Helper path to dump texture -#ifdef _WINDOWS +#ifdef _WIN32 const std::string root_sw("c:\\temp1\\_"); const std::string root_hw("c:\\temp2\\_"); #else