mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
0f11838d93
commit
04a8efd8c3
|
@ -220,7 +220,9 @@ typedef struct _GSdriverInfo {
|
||||||
void *common;
|
void *common;
|
||||||
} GSdriverInfo;
|
} 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
|
typedef struct _winInfo { // unsupported values must be set to zero
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
HMENU hMenu;
|
HMENU hMenu;
|
||||||
|
|
|
@ -184,7 +184,7 @@ typedef union _s128_t
|
||||||
// The best would be to port all _InterlockedExchange function to use
|
// The best would be to port all _InterlockedExchange function to use
|
||||||
// Theading::Atomic* function. Unfortunately Win version is not happy, until
|
// Theading::Atomic* function. Unfortunately Win version is not happy, until
|
||||||
// code is properly fixed let's use a basic type alias.
|
// code is properly fixed let's use a basic type alias.
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
typedef long vol_t;
|
typedef long vol_t;
|
||||||
#else
|
#else
|
||||||
typedef s32 vol_t;
|
typedef s32 vol_t;
|
||||||
|
|
|
@ -111,7 +111,7 @@ void Threading::pxThread::_DoSetThreadName( const char* name )
|
||||||
{
|
{
|
||||||
// This feature needs Windows headers and MSVC's SEH support:
|
// 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.
|
// This code sample was borrowed form some obscure MSDN article.
|
||||||
// In a rare bout of sanity, it's an actual Microsoft-published hack
|
// In a rare bout of sanity, it's an actual Microsoft-published hack
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class SingleCoreAffinity
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
#ifdef _WINDOWS_
|
#ifdef _WIN32
|
||||||
HANDLE s_threadId;
|
HANDLE s_threadId;
|
||||||
DWORD s_oldmask;
|
DWORD s_oldmask;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
# include <Windows.h>
|
# include <Windows.h>
|
||||||
# undef Yield
|
# undef Yield
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
|
@ -65,7 +65,7 @@ class FlatFileReader : public AsyncFileReader
|
||||||
{
|
{
|
||||||
DeclareNoncopyableObject( FlatFileReader );
|
DeclareNoncopyableObject( FlatFileReader );
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
HANDLE hOverlappedFile;
|
HANDLE hOverlappedFile;
|
||||||
|
|
||||||
OVERLAPPED asyncOperationContext;
|
OVERLAPPED asyncOperationContext;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
// windows and *nix and work with non-english file names.
|
// 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
|
// 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*)
|
// 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_wfilename(name_wxstr) (name_wxstr.wc_str())
|
||||||
# define PX_fopen_rb(name_wxstr) (_wfopen(PX_wfilename(name_wxstr), L"rb"))
|
# define PX_fopen_rb(name_wxstr) (_wfopen(PX_wfilename(name_wxstr), L"rb"))
|
||||||
#else
|
#else
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
# define PX_fopen_rb(name_wxstr) (fopen(PX_wfilename(name_wxstr), "rb"))
|
# define PX_fopen_rb(name_wxstr) (fopen(PX_wfilename(name_wxstr), "rb"))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
# define PX_fseeko _fseeki64
|
# define PX_fseeko _fseeki64
|
||||||
# define PX_ftello _ftelli64
|
# define PX_ftello _ftelli64
|
||||||
# define PX_off_t s64 /* __int64 */
|
# define PX_off_t s64 /* __int64 */
|
||||||
|
|
|
@ -200,7 +200,7 @@ void GzippedFileReader::InitZstates() {
|
||||||
m_zstates = new Czstate[size]();
|
m_zstates = new Czstate[size]();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef _WIN32
|
||||||
void GzippedFileReader::AsyncPrefetchReset() {};
|
void GzippedFileReader::AsyncPrefetchReset() {};
|
||||||
void GzippedFileReader::AsyncPrefetchOpen() {};
|
void GzippedFileReader::AsyncPrefetchOpen() {};
|
||||||
void GzippedFileReader::AsyncPrefetchClose() {};
|
void GzippedFileReader::AsyncPrefetchClose() {};
|
||||||
|
@ -275,7 +275,7 @@ void GzippedFileReader::AsyncPrefetchCancel()
|
||||||
|
|
||||||
asyncInProgress = false;
|
asyncInProgress = false;
|
||||||
};
|
};
|
||||||
#endif /* WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
// TODO: do better than just checking existance and extension
|
// TODO: do better than just checking existance and extension
|
||||||
bool GzippedFileReader::CanHandle(const wxString& fileName) {
|
bool GzippedFileReader::CanHandle(const wxString& fileName) {
|
||||||
|
|
|
@ -77,7 +77,7 @@ private:
|
||||||
|
|
||||||
ChunksCache m_cache;
|
ChunksCache m_cache;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
// Used by async prefetch
|
// Used by async prefetch
|
||||||
HANDLE hOverlappedFile;
|
HANDLE hOverlappedFile;
|
||||||
OVERLAPPED asyncOperationContext;
|
OVERLAPPED asyncOperationContext;
|
||||||
|
|
|
@ -115,7 +115,7 @@ Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
|
||||||
#define WINSIZE 32768U /* sliding window size */
|
#define WINSIZE 32768U /* sliding window size */
|
||||||
#define CHUNK (64 * 1024) /* file input buffer size */
|
#define CHUNK (64 * 1024) /* file input buffer size */
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
# pragma pack(push, indexData, 1)
|
# pragma pack(push, indexData, 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ struct point {
|
||||||
int bits; /* number of bits (1-7) from byte at in - 1, or 0 */
|
int bits; /* number of bits (1-7) from byte at in - 1, or 0 */
|
||||||
unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */
|
unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */
|
||||||
}
|
}
|
||||||
#ifndef WIN32
|
#ifndef _WIN32
|
||||||
__attribute__((packed))
|
__attribute__((packed))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
@ -142,14 +142,14 @@ struct access {
|
||||||
s32 span; /* once the index is built, holds the span size used to build it */
|
s32 span; /* once the index is built, holds the span size used to build it */
|
||||||
PX_off_t uncompressed_size; /* filled by build_index */
|
PX_off_t uncompressed_size; /* filled by build_index */
|
||||||
}
|
}
|
||||||
#ifndef WIN32
|
#ifndef _WIN32
|
||||||
__attribute__((packed))
|
__attribute__((packed))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
typedef struct access Access;
|
typedef struct access Access;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
# pragma pack(pop, indexData)
|
# pragma pack(pop, indexData)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ extern AppCoreThread CoreThread;
|
||||||
R5900DebugInterface r5900Debug;
|
R5900DebugInterface r5900Debug;
|
||||||
R3000DebugInterface r3000Debug;
|
R3000DebugInterface r3000Debug;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#define strcasecmp stricmp
|
#define strcasecmp stricmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
SymbolMap symbolMap;
|
SymbolMap symbolMap;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#define strcasecmp stricmp
|
#define strcasecmp stricmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#define USE_HOST_REWRITE 1
|
#define USE_HOST_REWRITE 1
|
||||||
|
|
||||||
#if USE_HOST_REWRITE
|
#if USE_HOST_REWRITE
|
||||||
# ifdef WIN32
|
# ifdef _WIN32
|
||||||
// disable this if you DON'T want "host:/usr/local/" paths
|
// disable this if you DON'T want "host:/usr/local/" paths
|
||||||
// to get rewritten into host:/
|
// to get rewritten into host:/
|
||||||
# define HOST_REWRITE_USR_LOCAL 1
|
# define HOST_REWRITE_USR_LOCAL 1
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
// The profiler does not have a Linux version yet.
|
// The profiler does not have a Linux version yet.
|
||||||
// So for now we turn it into duds for non-Win32 platforms.
|
// So for now we turn it into duds for non-Win32 platforms.
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
void ProfilerInit();
|
void ProfilerInit();
|
||||||
void ProfilerTerm();
|
void ProfilerTerm();
|
||||||
|
|
|
@ -181,7 +181,7 @@ CtrlDisassemblyView::CtrlDisassemblyView(wxWindow* parent, DebugInterface* _cpu)
|
||||||
setCurAddress(windowStart);
|
setCurAddress(windowStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
WXLRESULT CtrlDisassemblyView::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
WXLRESULT CtrlDisassemblyView::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (nMsg)
|
switch (nMsg)
|
||||||
|
@ -472,7 +472,7 @@ void CtrlDisassemblyView::render(wxDC& dc)
|
||||||
if (!cpu->isAlive())
|
if (!cpu->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
wxFont font = wxFont(wxSize(charWidth,rowHeight-2),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,L"Lucida Console");
|
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");
|
wxFont boldFont = wxFont(wxSize(charWidth,rowHeight-2),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,L"Lucida Console");
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
void scrollbarEvent(wxScrollWinEvent& evt);
|
void scrollbarEvent(wxScrollWinEvent& evt);
|
||||||
void sizeEvent(wxSizeEvent& evt);
|
void sizeEvent(wxSizeEvent& evt);
|
||||||
void focusEvent(wxFocusEvent& evt) { Refresh(); };
|
void focusEvent(wxFocusEvent& evt) { Refresh(); };
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ CtrlMemView::CtrlMemView(wxWindow* parent, DebugInterface* _cpu)
|
||||||
hexStart = addressStart + 9*charWidth;
|
hexStart = addressStart + 9*charWidth;
|
||||||
asciiStart = hexStart + (rowSize*3+1)*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");
|
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");
|
underlineFont = wxFont(wxSize(charWidth,rowHeight),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,true,L"Lucida Console");
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -185,7 +185,7 @@ void drawU32Text(wxDC& dc, u32 value, int x, int y)
|
||||||
|
|
||||||
void CtrlRegisterList::OnDraw(wxDC& dc)
|
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");
|
wxFont font = wxFont(wxSize(charWidth,rowHeight-2),wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,L"Lucida Console");
|
||||||
#else
|
#else
|
||||||
wxFont font = wxFont(8,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,L"Lucida Console");
|
wxFont font = wxFont(8,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,L"Lucida Console");
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "BreakpointWindow.h"
|
#include "BreakpointWindow.h"
|
||||||
#include "PathDefs.h"
|
#include "PathDefs.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ void DisassemblyDialog::onSizeEvent(wxSizeEvent& event)
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
WXLRESULT DisassemblyDialog::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
WXLRESULT DisassemblyDialog::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (nMsg)
|
switch (nMsg)
|
||||||
|
|
|
@ -89,7 +89,7 @@ public:
|
||||||
void reset();
|
void reset();
|
||||||
void setDebugMode(bool debugMode, bool switchPC);
|
void setDebugMode(bool debugMode, bool switchPC);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue