gsdx: s/_WINDOWS/_WIN32/

It's the proper Windows preprocessor macro.
This commit is contained in:
Jonathan Li 2016-01-27 15:33:10 +00:00
parent 50c7775e47
commit 0f11838d93
26 changed files with 65 additions and 65 deletions

View File

@ -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"

View File

@ -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;

View File

@ -23,7 +23,7 @@
#include "GPURenderer.h"
#include "GSdx.h"
#ifdef _WINDOWS
#ifdef _WIN32
map<HWND, GPURenderer*> 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)
{

View File

@ -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;

View File

@ -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 <io.h>
#include <fcntl.h>

View File

@ -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

View File

@ -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<std::recursive_mutex> lock(m_lock);
#ifdef _WINDOWS
#ifdef _WIN32
if(m_src)
{

View File

@ -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<IGraphBuilder> m_graph;
CComPtr<IBaseFilter> m_src;

View File

@ -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)

View File

@ -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

View File

@ -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)
{

View File

@ -421,7 +421,7 @@ void GSTextureOGL::Unmap()
{
}
#ifndef _WINDOWS
#ifndef _WIN32
#pragma pack(push, 1)

View File

@ -85,7 +85,7 @@ void GSTextureSW::Unmap()
m_mapped = 0;
}
#ifndef _WINDOWS
#ifndef _WIN32
#pragma pack(push, 1)

View File

@ -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)
{

View File

@ -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()
{

View File

@ -55,7 +55,7 @@ public:
static string GetDeviceUniqueName(cl::Device& device);
#endif
#ifdef _WINDOWS
#ifdef _WIN32
static bool CheckDirectX();
static bool CheckDXGI();

View File

@ -297,7 +297,7 @@ public:
GSVector4i fit(int preset) const;
#ifdef _WINDOWS
#ifdef _WIN32
__forceinline operator LPCRECT() const
{

View File

@ -22,7 +22,7 @@
#include "stdafx.h"
#include "GSWndDX.h"
#ifdef _WINDOWS
#ifdef _WIN32
GSWndDX::GSWndDX()
: m_hWnd(NULL)
, m_frame(true)

View File

@ -22,7 +22,7 @@
#include "stdafx.h"
#include "GSWnd.h"
#ifdef _WINDOWS
#ifdef _WIN32
class GSWndDX : public GSWnd
{
HWND m_hWnd;

View File

@ -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)
{

View File

@ -21,7 +21,7 @@
#include "GSWnd.h"
#ifdef _WINDOWS
#ifdef _WIN32
class GSWndWGL : public GSWndGL
{

View File

@ -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<uint32>(GSRendererType::OGL_HW), "OpenGL", "Hardware"));
m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::DX1011_HW), "Direct3D11", "Hardware"));
m_gs_renderers.push_back(GSSetting(static_cast<uint32>(GSRendererType::DX9_HW), "Direct3D9", "Hardware"));

View File

@ -36,7 +36,7 @@ public:
void* GetModuleHandlePtr();
#ifdef _WINDOWS
#ifdef _WIN32
HMODULE GetModuleHandle() {return (HMODULE)GetModuleHandlePtr();}
#endif

View File

@ -49,7 +49,7 @@
#define DISABLE_PERF_MON // Burn cycle for nothing in release mode
#endif
#ifdef _WINDOWS
#ifdef _WIN32
//#define ENABLE_OPENCL
#endif

View File

@ -59,7 +59,7 @@ string format(const char* fmt, ...)
return s;
}
#ifdef _WINDOWS
#ifdef _WIN32
void* vmalloc(size_t size, bool code)
{

View File

@ -27,7 +27,7 @@
#include "config.h"
#ifdef _WINDOWS
#ifdef _WIN32
#include "targetver.h"
@ -109,7 +109,7 @@ using namespace std;
#include <memory>
#if _MSC_VER >= 1800 || !defined(_WINDOWS)
#if _MSC_VER >= 1800 || !defined(_WIN32)
#include <unordered_map>
#include <unordered_set>
#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 <GL/gl.h>
@ -306,7 +306,7 @@ struct aligned_free_second {template<class T> 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<class T> 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