pcsx2|common: Use _WIN32 for Windows preprocessor macro

It's predefined, unlike WIN32 and _WINDOWS (and other variants), which
are defined in the property sheets.
This commit is contained in:
Jonathan Li 2016-01-27 20:11:22 +00:00
parent 0f11838d93
commit 04a8efd8c3
20 changed files with 30 additions and 28 deletions

View File

@ -220,7 +220,9 @@ typedef struct _GSdriverInfo {
void *common;
} GSdriverInfo;
#ifdef _WINDOWS_
#ifdef _WIN32
// TODO: Only GSNull uses this? Yet it doesn't seem to be used by PCSX2.
#include <windows.h>
typedef struct _winInfo { // unsupported values must be set to zero
HWND hWnd;
HMENU hMenu;

View File

@ -184,7 +184,7 @@ typedef union _s128_t
// The best would be to port all _InterlockedExchange function to use
// Theading::Atomic* function. Unfortunately Win version is not happy, until
// code is properly fixed let's use a basic type alias.
#ifdef WIN32
#ifdef _WIN32
typedef long vol_t;
#else
typedef s32 vol_t;

View File

@ -111,7 +111,7 @@ void Threading::pxThread::_DoSetThreadName( const char* name )
{
// This feature needs Windows headers and MSVC's SEH support:
#if defined(_WINDOWS_) && defined(_MSC_VER)
#if defined(_WIN32) && defined(_MSC_VER)
// This code sample was borrowed form some obscure MSDN article.
// In a rare bout of sanity, it's an actual Microsoft-published hack

View File

@ -35,7 +35,7 @@
#include "PrecompiledHeader.h"
#ifdef WIN32
#ifdef _WIN32
#include <math.h>

View File

@ -28,7 +28,7 @@ class SingleCoreAffinity
{
protected:
#ifdef _WINDOWS_
#ifdef _WIN32
HANDLE s_threadId;
DWORD s_oldmask;
#endif

View File

@ -15,7 +15,7 @@
#pragma once
#ifdef WIN32
#ifdef _WIN32
# include <Windows.h>
# undef Yield
#elif defined(__linux__)
@ -65,7 +65,7 @@ class FlatFileReader : public AsyncFileReader
{
DeclareNoncopyableObject( FlatFileReader );
#ifdef WIN32
#ifdef _WIN32
HANDLE hOverlappedFile;
OVERLAPPED asyncOperationContext;

View File

@ -23,7 +23,7 @@
// windows and *nix and work with non-english file names.
// Maybe some day we'll convert all file related ops to wxWidgets, which means also the
// instances at zlib_indexed.h (which use plain stdio FILE*)
#ifdef WIN32
#ifdef _WIN32
# define PX_wfilename(name_wxstr) (name_wxstr.wc_str())
# define PX_fopen_rb(name_wxstr) (_wfopen(PX_wfilename(name_wxstr), L"rb"))
#else
@ -31,7 +31,7 @@
# define PX_fopen_rb(name_wxstr) (fopen(PX_wfilename(name_wxstr), "rb"))
#endif
#ifdef WIN32
#ifdef _WIN32
# define PX_fseeko _fseeki64
# define PX_ftello _ftelli64
# define PX_off_t s64 /* __int64 */

View File

@ -200,7 +200,7 @@ void GzippedFileReader::InitZstates() {
m_zstates = new Czstate[size]();
}
#ifndef WIN32
#ifndef _WIN32
void GzippedFileReader::AsyncPrefetchReset() {};
void GzippedFileReader::AsyncPrefetchOpen() {};
void GzippedFileReader::AsyncPrefetchClose() {};
@ -275,7 +275,7 @@ void GzippedFileReader::AsyncPrefetchCancel()
asyncInProgress = false;
};
#endif /* WIN32 */
#endif /* _WIN32 */
// TODO: do better than just checking existance and extension
bool GzippedFileReader::CanHandle(const wxString& fileName) {

View File

@ -77,7 +77,7 @@ private:
ChunksCache m_cache;
#ifdef WIN32
#ifdef _WIN32
// Used by async prefetch
HANDLE hOverlappedFile;
OVERLAPPED asyncOperationContext;

View File

@ -115,7 +115,7 @@ Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
#define WINSIZE 32768U /* sliding window size */
#define CHUNK (64 * 1024) /* file input buffer size */
#ifdef WIN32
#ifdef _WIN32
# pragma pack(push, indexData, 1)
#endif
@ -126,7 +126,7 @@ struct point {
int bits; /* number of bits (1-7) from byte at in - 1, or 0 */
unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */
}
#ifndef WIN32
#ifndef _WIN32
__attribute__((packed))
#endif
;
@ -142,14 +142,14 @@ struct access {
s32 span; /* once the index is built, holds the span size used to build it */
PX_off_t uncompressed_size; /* filled by build_index */
}
#ifndef WIN32
#ifndef _WIN32
__attribute__((packed))
#endif
;
typedef struct access Access;
#ifdef WIN32
#ifdef _WIN32
# pragma pack(pop, indexData)
#endif

View File

@ -32,7 +32,7 @@ extern AppCoreThread CoreThread;
R5900DebugInterface r5900Debug;
R3000DebugInterface r3000Debug;
#ifdef WIN32
#ifdef _WIN32
#define strcasecmp stricmp
#endif

View File

@ -20,7 +20,7 @@
SymbolMap symbolMap;
#ifdef WIN32
#ifdef _WIN32
#define strcasecmp stricmp
#endif

View File

@ -29,7 +29,7 @@
#define USE_HOST_REWRITE 1
#if USE_HOST_REWRITE
# ifdef WIN32
# ifdef _WIN32
// disable this if you DON'T want "host:/usr/local/" paths
// to get rewritten into host:/
# define HOST_REWRITE_USR_LOCAL 1

View File

@ -21,7 +21,7 @@
// The profiler does not have a Linux version yet.
// So for now we turn it into duds for non-Win32 platforms.
#ifdef WIN32
#ifdef _WIN32
void ProfilerInit();
void ProfilerTerm();

View File

@ -181,7 +181,7 @@ CtrlDisassemblyView::CtrlDisassemblyView(wxWindow* parent, DebugInterface* _cpu)
setCurAddress(windowStart);
}
#ifdef WIN32
#ifdef _WIN32
WXLRESULT CtrlDisassemblyView::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
switch (nMsg)
@ -472,7 +472,7 @@ void CtrlDisassemblyView::render(wxDC& dc)
if (!cpu->isAlive())
return;
#ifdef WIN32
#ifdef _WIN32
wxFont font = wxFont(wxSize(charWidth,rowHeight-2),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,L"Lucida Console");
wxFont boldFont = wxFont(wxSize(charWidth,rowHeight-2),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,L"Lucida Console");
#else

View File

@ -30,7 +30,7 @@ public:
void scrollbarEvent(wxScrollWinEvent& evt);
void sizeEvent(wxSizeEvent& evt);
void focusEvent(wxFocusEvent& evt) { Refresh(); };
#ifdef WIN32
#ifdef _WIN32
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif

View File

@ -69,7 +69,7 @@ CtrlMemView::CtrlMemView(wxWindow* parent, DebugInterface* _cpu)
hexStart = addressStart + 9*charWidth;
asciiStart = hexStart + (rowSize*3+1)*charWidth;
#ifdef WIN32
#ifdef _WIN32
font = wxFont(wxSize(charWidth,rowHeight),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,L"Lucida Console");
underlineFont = wxFont(wxSize(charWidth,rowHeight),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,true,L"Lucida Console");
#else

View File

@ -185,7 +185,7 @@ void drawU32Text(wxDC& dc, u32 value, int x, int y)
void CtrlRegisterList::OnDraw(wxDC& dc)
{
#ifdef WIN32
#ifdef _WIN32
wxFont font = wxFont(wxSize(charWidth,rowHeight-2),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,L"Lucida Console");
#else
wxFont font = wxFont(8,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,L"Lucida Console");

View File

@ -23,7 +23,7 @@
#include "BreakpointWindow.h"
#include "PathDefs.h"
#ifdef WIN32
#ifdef _WIN32
#include <Windows.h>
#endif
@ -287,7 +287,7 @@ void DisassemblyDialog::onSizeEvent(wxSizeEvent& event)
event.Skip();
}
#ifdef WIN32
#ifdef _WIN32
WXLRESULT DisassemblyDialog::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
switch (nMsg)

View File

@ -89,7 +89,7 @@ public:
void reset();
void setDebugMode(bool debugMode, bool switchPC);
#ifdef WIN32
#ifdef _WIN32
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif