1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-25 22:09:35 +00:00

Stop using OS_WINDOWS

This commit is contained in:
zilmar 2018-11-10 22:33:16 +11:00 committed by Sergey Lipskiy
parent af1e15b658
commit d50aabaa10
36 changed files with 63 additions and 65 deletions

2
.gitignore vendored
View File

@ -16,3 +16,5 @@ projects/msvc12/GeneratedFiles
projects/msvc12/libGLideNHQ.dir
src/Revision.h
/projects/msvc/.vs
/projects/msvc/GLideN64.VC.VC.opendb
/projects/msvc/GLideN64.VC.db

View File

@ -63,7 +63,7 @@
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>OS_WINDOWS;_WINDOWS;UNICODE;WIN32;QT_STATICPLUGIN;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;QT_UITOOLS_LIB;QT_WINEXTRAS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_WINDOWS;UNICODE;WIN32;QT_STATICPLUGIN;QT_NO_DEBUG;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;NDEBUG;QT_UITOOLS_LIB;QT_WINEXTRAS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@ -103,7 +103,7 @@
<ExceptionHandling>Sync</ExceptionHandling>
<ObjectFileName>$(IntDir)</ObjectFileName>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>DEBUG_DUMP;_DEBUG;OS_WINDOWS;_WINDOWS;UNICODE;WIN32;QT_STATICPLUGIN;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_UITOOLS_LIB;QT_WINEXTRAS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>DEBUG_DUMP;_DEBUG;_WINDOWS;UNICODE;WIN32;QT_STATICPLUGIN;QT_WIDGETS_LIB;QT_GUI_LIB;QT_CORE_LIB;QT_UITOOLS_LIB;QT_WINEXTRAS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessToFile>false</PreprocessToFile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
@ -164,13 +164,13 @@
if errorlevel 1 goto VCEnd
if errorlevel 1 goto VCEnd
endlocal
"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -DOS_WINDOWS -D_WINDOWS -DUNICODE -DWIN32 -DQT_STATICPLUGIN -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_UITOOLS_LIB -DQT_WINEXTRAS_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I." "-I$(QTDIR)\mkspecs\win32-msvc2013" "-I.\GeneratedFiles" "-I$(QTDIR)\include\QtUiTools" "-I$(QTDIR)\include\QtWinExtras"</Command>
"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_STATICPLUGIN -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_UITOOLS_LIB -DQT_WINEXTRAS_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I." "-I$(QTDIR)\mkspecs\win32-msvc2013" "-I.\GeneratedFiles" "-I$(QTDIR)\include\QtUiTools" "-I$(QTDIR)\include\QtWinExtras"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing AboutDialog.h...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal
if errorlevel 1 goto VCEnd
if errorlevel 1 goto VCEnd
endlocal
"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -DDEBUG_DUMP -D_DEBUG -DOS_WINDOWS -D_WINDOWS -DUNICODE -DWIN32 -DQT_STATICPLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_UITOOLS_LIB -DQT_WINEXTRAS_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I." "-I$(QTDIR)\mkspecs\win32-msvc2013" "-I.\GeneratedFiles" "-I$(QTDIR)\include\QtUiTools" "-I$(QTDIR)\include\QtWinExtras"</Command>
"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -DDEBUG_DUMP -D_DEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_STATICPLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_UITOOLS_LIB -DQT_WINEXTRAS_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I." "-I$(QTDIR)\mkspecs\win32-msvc2013" "-I.\GeneratedFiles" "-I$(QTDIR)\include\QtUiTools" "-I$(QTDIR)\include\QtWinExtras"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing AboutDialog.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
@ -182,13 +182,13 @@ endlocal
if errorlevel 1 goto VCEnd
if errorlevel 1 goto VCEnd
endlocal
"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -DOS_WINDOWS -D_WINDOWS -DUNICODE -DWIN32 -DQT_STATICPLUGIN -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_UITOOLS_LIB -DQT_WINEXTRAS_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I." "-I$(QTDIR)\mkspecs\win32-msvc2013" "-I.\GeneratedFiles" "-I$(QTDIR)\include\QtUiTools" "-I$(QTDIR)\include\QtWinExtras"</Command>
"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DQT_STATICPLUGIN -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_UITOOLS_LIB -DQT_WINEXTRAS_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I." "-I$(QTDIR)\mkspecs\win32-msvc2013" "-I.\GeneratedFiles" "-I$(QTDIR)\include\QtUiTools" "-I$(QTDIR)\include\QtWinExtras"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing ConfigDialog.h...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">setlocal
if errorlevel 1 goto VCEnd
if errorlevel 1 goto VCEnd
endlocal
"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -DDEBUG_DUMP -D_DEBUG -DOS_WINDOWS -D_WINDOWS -DUNICODE -DWIN32 -DQT_STATICPLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_UITOOLS_LIB -DQT_WINEXTRAS_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I." "-I$(QTDIR)\mkspecs\win32-msvc2013" "-I.\GeneratedFiles" "-I$(QTDIR)\include\QtUiTools" "-I$(QTDIR)\include\QtWinExtras"</Command>
"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o "$(ConfigurationName)\moc_%(Filename).cpp" -DDEBUG_DUMP -D_DEBUG -D_WINDOWS -DUNICODE -DWIN32 -DQT_STATICPLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_UITOOLS_LIB -DQT_WINEXTRAS_LIB "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I." "-I$(QTDIR)\mkspecs\win32-msvc2013" "-I.\GeneratedFiles" "-I$(QTDIR)\include\QtUiTools" "-I$(QTDIR)\include\QtWinExtras"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing ConfigDialog.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ConfigurationName)\moc_%(Filename).cpp</Outputs>

View File

@ -53,7 +53,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>UNICODE;WIN32;_WINDOWS;OS_WINDOWS;_CRT_SECURE_NO_WARNINGS;__MSC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNICODE;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;__MSC__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ObjectFileName>$(IntDir)</ObjectFileName>
</ClCompile>

View File

@ -49,7 +49,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;UNICODE;OS_WINDOWS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;UNICODE;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -202,7 +202,6 @@ endif(MINGW)
if(WIN32)
list(APPEND GLideN64_SOURCES ${GLideN64_SOURCES_WIN})
add_definitions(
-DOS_WINDOWS
-D__WIN32__
-DWIN32
-D_WIN32_ASM

View File

@ -1,8 +1,8 @@
#ifdef OS_WINDOWS
#ifdef _WIN32
# include <windows.h>
#else
# include "winlnxdefs.h"
#endif // OS_WINDOWS
#endif // _WIN32
#include "PluginAPI.h"

View File

@ -1,8 +1,8 @@
#ifdef OS_WINDOWS
#ifdef _WIN32
# include <windows.h>
#else
# include "winlnxdefs.h"
#endif // OS_WINDOWS
#endif // _WIN32
#include "RSP.h"
#include "PluginAPI.h"
#include "Config.h"
@ -92,7 +92,7 @@ void Config::resetToDefaults()
api().GetUserCachePath(textureFilter.txDumpPath);
gln_wcscat(textureFilter.txDumpPath, wst("/texture_dump"));
#ifdef OS_WINDOWS
#ifdef _WIN32
font.name.assign("arial.ttf");
#elif defined (OS_ANDROID)
font.name.assign("DroidSans.ttf");

View File

@ -27,7 +27,7 @@ using namespace graphics;
static
bool getCursorPos(long & _x, long & _y)
{
#ifdef OS_WINDOWS
#ifdef _WIN32
POINT pt;
const bool res = GetCursorPos(&pt) == TRUE;
#ifndef MUPENPLUSAPI
@ -48,7 +48,7 @@ bool getCursorPos(long & _x, long & _y)
_x = pt.x;
_y = pt.y;
return res;
#else // OS_WINDOWS
#else // _WIN32
_x = _y = 0;
return false;
#endif

View File

@ -5,7 +5,7 @@
extern "C" {
#endif
#ifdef OS_WINDOWS
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#else

View File

@ -45,7 +45,6 @@ if(WIN32)
LINK_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/lib )
add_definitions(
-DWIN32
-DOS_WINDOWS
-D_CRT_SECURE_NO_WARNINGS
)
endif(WIN32)

View File

@ -24,7 +24,7 @@
#ifndef __EXT_TXFILTER_H__
#define __EXT_TXFILTER_H__
#ifdef OS_WINDOWS
#ifdef _WIN32
#include <windows.h>
#define TXHMODULE HMODULE
#define DLOPEN(a) LoadLibraryW(a)
@ -140,7 +140,7 @@ typedef void (*dispInfoFuncExt)(const wchar_t *format, ...);
/* dll exports */
/* Use TXFilter as a library. Define exported functions. */
#ifdef OS_WINDOWS
#ifdef _WIN32
#ifdef TXFILTER_LIB
#define TAPI __declspec(dllexport)
#define TAPIENTRY
@ -148,7 +148,7 @@ typedef void (*dispInfoFuncExt)(const wchar_t *format, ...);
#define TAPI
#define TAPIENTRY
#endif
#else // OS_WINDOWS
#else // _WIN32
#ifdef TXFILTER_LIB
#define TAPI __attribute__((visibility("default")))
#define TAPIENTRY
@ -156,7 +156,7 @@ typedef void (*dispInfoFuncExt)(const wchar_t *format, ...);
#define TAPI
#define TAPIENTRY
#endif
#endif // OS_WINDOWS
#endif // _WIN32
#ifdef TXFILTER_DLL
typedef unsigned char uint8;

View File

@ -226,7 +226,7 @@ TxCache::save(const wchar_t *path, const wchar_t *filename, int config)
osal_mkdirp(path);
/* Ugly hack to enable fopen/gzopen in Win9x */
#ifdef OS_WINDOWS
#ifdef _WIN32
wchar_t curpath[MAX_PATH];
GETCWD(MAX_PATH, curpath);
CHDIR(path);
@ -304,7 +304,7 @@ TxCache::load(const wchar_t *path, const wchar_t *filename, int config, boolean
/* find it on disk */
char cbuf[MAX_PATH];
#ifdef OS_WINDOWS
#ifdef _WIN32
wchar_t curpath[MAX_PATH];
GETCWD(MAX_PATH, curpath);
CHDIR(path);

View File

@ -614,7 +614,7 @@ TxFilter::dmptx(uint8 *src, int width, int height, int rowStridePixel, ColorForm
tmpbuf.append(wbuf);
}
#ifdef OS_WINDOWS
#ifdef _WIN32
if ((fp = _wfopen(tmpbuf.c_str(), wst("wb"))) != nullptr) {
#else
char cbuf[MAX_PATH];

View File

@ -175,7 +175,7 @@ TxHiResCache::loadHiResTextures(const wchar_t * dir_path, boolean replace)
LoadResult result = resOk;
#ifdef OS_WINDOWS
#ifdef _WIN32
wchar_t curpath[MAX_PATH];
GETCWD(MAX_PATH, curpath);
CHDIR(dir_path);
@ -244,7 +244,7 @@ TxHiResCache::loadHiResTextures(const wchar_t * dir_path, boolean replace)
/* XXX case sensitivity fiasco!
* files must use _a, _rgb, _all, _allciByRGBA, _ciByRGBA, _ci
* and file extensions must be in lower case letters! */
#ifdef OS_WINDOWS
#ifdef _WIN32
{
unsigned int i;
for (i = 0; i < strlen(fname); i++) fname[i] = tolower(fname[i]);
@ -259,7 +259,7 @@ TxHiResCache::loadHiResTextures(const wchar_t * dir_path, boolean replace)
/* XXX case sensitivity fiasco!
* files must use _a, _rgb, _all, _allciByRGBA, _ciByRGBA, _ci
* and file extensions must be in lower case letters! */
#ifdef OS_WINDOWS
#ifdef _WIN32
{
unsigned int i;
for (i = 0; i < strlen(fname); i++) fname[i] = tolower(fname[i]);
@ -461,7 +461,7 @@ TxHiResCache::loadHiResTextures(const wchar_t * dir_path, boolean replace)
*/
if (pfname == strstr(fname, "_all.png") ||
pfname == strstr(fname, "_all.dds") ||
#ifdef OS_WINDOWS
#ifdef _WIN32
pfname == strstr(fname, "_allcibyrgba.png") ||
pfname == strstr(fname, "_allcibyrgba.dds") ||
pfname == strstr(fname, "_cibyrgba.png") ||

View File

@ -27,7 +27,7 @@
#include <zlib.h>
#include <assert.h>
#if defined (OS_WINDOWS)
#if defined (_WIN32)
#include <malloc.h>
#elif defined (OS_MAC_OS_X)
#include <sys/param.h>

View File

@ -24,7 +24,6 @@ add_definitions(
if(WIN32)
add_definitions(
-DWIN32
-DOS_WINDOWS
)
endif(WIN32)

View File

@ -502,7 +502,7 @@ void ConfigDialog::accept()
// OSD settings
config.font.size = ui->fontSizeSpinBox->value();
#ifdef OS_WINDOWS
#ifdef WIN32
config.font.name = ui->fontLineEdit->text().toLocal8Bit().constData();
#else
config.font.name = ui->fontLineEdit->text().toStdString();

View File

@ -5,7 +5,7 @@
extern "C" {
#endif
#ifdef OS_WINDOWS
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#else

View File

@ -1,7 +1,7 @@
#include <QSettings>
#include <QColor>
#ifdef OS_WINDOWS
#ifdef WIN32
#include <windows.h>
#else
#include "../winlnxdefs.h"

View File

@ -1,6 +1,6 @@
#include "GLFunctions.h"
#ifdef OS_WINDOWS
#ifdef _WIN32
#define glGetProcAddress wglGetProcAddress
#define GL_GET_PROC_ADR(proc_type, proc_name) g_##proc_name = (proc_type) glGetProcAddress(#proc_name)
@ -61,7 +61,7 @@ static void* IOSGLGetProcAddress (const char *name)
//GL Fucntions
#ifdef OS_WINDOWS
#ifdef _WIN32
PFNGLACTIVETEXTUREPROC g_glActiveTexture;
PFNGLBLENDCOLORPROC g_glBlendColor;
#elif defined(EGL) || defined(OS_IOS)
@ -205,7 +205,7 @@ void initGLFunctions()
#elif defined(VERO4K)
void *gles2so = dlopen("/opt/vero3/lib/libGLESv2.so", RTLD_NOW);
#endif
#ifdef OS_WINDOWS
#ifdef _WIN32
GL_GET_PROC_ADR(PFNGLACTIVETEXTUREPROC, glActiveTexture);
GL_GET_PROC_ADR(PFNGLBLENDCOLORPROC, glBlendColor);
#elif defined(EGL) || defined(OS_IOS)

View File

@ -1,7 +1,7 @@
#ifndef GLFUNCTIONS_H
#define GLFUNCTIONS_H
#ifdef OS_WINDOWS
#ifdef _WIN32
#include <windows.h>
#elif defined(OS_LINUX)
//#define GL_GLEXT_PROTOTYPES
@ -113,7 +113,7 @@ extern PFNGLREADBUFFERPROC g_glReadBuffer;
extern PFNGLFINISHPROC g_glFinish;
#endif
#ifdef OS_WINDOWS
#ifdef _WIN32
#define glActiveTexture g_glActiveTexture
#define glBlendColor g_glBlendColor

View File

@ -60,7 +60,7 @@ bool ShaderStorage::_saveCombinerKeys(const graphics::Combiners & _combiners) co
wchar_t keysFileName[PLUGIN_PATH_SIZE];
getStorageFileName(m_glinfo, keysFileName, L"keys");
#if defined(OS_WINDOWS) && !defined(MINGW)
#if defined(_WIN32) && !defined(MINGW)
std::ofstream keysOut(keysFileName, std::ofstream::trunc);
#else
char filename_c[PATH_MAX];
@ -117,7 +117,7 @@ bool ShaderStorage::saveShadersStorage(const graphics::Combiners & _combiners) c
wchar_t shadersFileName[PLUGIN_PATH_SIZE];
getStorageFileName(m_glinfo, shadersFileName, L"shaders");
#if defined(OS_WINDOWS) && !defined(MINGW)
#if defined(_WIN32) && !defined(MINGW)
std::ofstream shadersOut(shadersFileName, std::ofstream::binary | std::ofstream::trunc);
#else
char filename_c[PATH_MAX];
@ -219,7 +219,7 @@ bool ShaderStorage::_loadFromCombinerKeys(graphics::Combiners & _combiners)
{
wchar_t keysFileName[PLUGIN_PATH_SIZE];
getStorageFileName(m_glinfo, keysFileName, L"keys");
#if defined(OS_WINDOWS) && !defined(MINGW)
#if defined(_WIN32) && !defined(MINGW)
std::ifstream fin(keysFileName);
#else
char fileName_c[PATH_MAX];
@ -281,7 +281,7 @@ bool ShaderStorage::loadShadersStorage(graphics::Combiners & _combiners)
getStorageFileName(m_glinfo, shadersFileName, L"shaders");
const u32 configOptionsBitSet = graphics::CombinerProgram::getShaderCombinerOptionsBits();
#if defined(OS_WINDOWS) && !defined(MINGW)
#if defined(_WIN32) && !defined(MINGW)
std::ifstream fin(shadersFileName, std::ofstream::binary);
#else
char fileName_c[PATH_MAX];

View File

@ -51,7 +51,7 @@
Glide64Keys::Glide64Keys()
{
#ifdef OS_WINDOWS
#ifdef _WIN32
m_keys[G64_VK_CONTROL] = 0x11;
m_keys[G64_VK_ALT] = 0x12;
m_keys[G64_VK_INSERT] = 0x2D;
@ -121,7 +121,7 @@ m_keys[G64_VK_W] = 119;
bool isKeyPressed(int _key, int _mask)
{
static Glide64Keys g64Keys;
#ifdef OS_WINDOWS
#ifdef _WIN32
#ifdef MUPENPLUSAPI
return (GetAsyncKeyState(g64Keys[_key]) & _mask) != 0;
#else

View File

@ -14,14 +14,14 @@ void LOG(u16 type, const char * format, ...) {
api().GetUserDataPath(logPath);
gln_wcscat(logPath, wst("/gliden64.log"));
#ifdef OS_WINDOWS
#ifdef _WIN32
FILE *dumpFile = _wfopen(logPath, wst("a+"));
#else
constexpr size_t bufSize = PLUGIN_PATH_SIZE * 6;
char cbuf[bufSize];
wcstombs(cbuf, logPath, bufSize);
FILE *dumpFile = fopen(cbuf, "a+");
#endif //OS_WINDOWS
#endif //_WIN32
if (dumpFile == nullptr)
return;
@ -32,7 +32,7 @@ void LOG(u16 type, const char * format, ...) {
va_end(va);
}
#if defined(OS_WINDOWS) && !defined(MINGW)
#if defined(_WIN32) && !defined(MINGW)
#include "windows/GLideN64_windows.h"
void debugPrint(const char * format, ...) {
char text[256];

View File

@ -22,7 +22,7 @@ void LOG(u16 type, const char * format, ...);
#endif
#if defined(OS_WINDOWS) && !defined(MINGW)
#if defined(_WIN32) && !defined(MINGW)
void debugPrint(const char * format, ...);
#else
#define debugPrint(A, ...)

View File

@ -1,7 +1,7 @@
#ifndef PLATFORM_H
#define PLATFORM_H
#ifdef OS_WINDOWS
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif

View File

@ -243,7 +243,7 @@ void setDepthClearColor()
void RSP_Init()
{
if (RDRAMSize == 0) {
#ifdef OS_WINDOWS
#ifdef _WIN32
// Calculate RDRAM size by intentionally causing an access violation
u32 test;
try
@ -258,9 +258,9 @@ void RSP_Init()
RDRAMSize = 0x7FFFFF;
else
RDRAMSize = 0x3FFFFF;
#else // OS_WINDOWS
#else // _WIN32
RDRAMSize = 1024 * 1024 * 8 - 1;
#endif // OS_WINDOWS
#endif // _WIN32
}
RSP.uc_start = RSP.uc_dstart = 0;

View File

@ -200,7 +200,7 @@ struct Atlas {
static
bool getFontFileName(char * _strName)
{
#ifdef OS_WINDOWS
#ifdef _WIN32
char * pSysPath = getenv("WINDIR");
if (pSysPath == nullptr)
return false;

View File

@ -26,7 +26,7 @@ extern "C" {
/* Plugin types */
#define PLUGIN_TYPE_GFX 2
#ifdef OS_WINDOWS
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#else

View File

@ -1,8 +1,8 @@
#ifdef OS_WINDOWS
#ifdef _WIN32
# include <windows.h>
#else
# include "winlnxdefs.h"
#endif // OS_WINDOWS
#endif // _WIN32
#include "PluginAPI.h"
#include "N64.h"

View File

@ -1,8 +1,8 @@
#ifdef OS_WINDOWS
#ifdef _WIN32
# include <windows.h>
#else
# include <winlnxdefs.h>
#endif // OS_WINDOWS
#endif // _WIN32
#include <assert.h>
#include <PluginAPI.h>

View File

@ -67,7 +67,7 @@ void PluginAPI::FindPluginPath(wchar_t * _strPath)
{
if (_strPath == nullptr)
return;
#ifdef OS_WINDOWS
#ifdef _WIN32
GetModuleFileNameW(nullptr, _strPath, PLUGIN_PATH_SIZE);
_cutLastPathSeparator(_strPath);
#elif defined(OS_LINUX)

View File

@ -4,12 +4,12 @@
#include "../Config.h"
#include <DisplayWindow.h>
#ifdef OS_WINDOWS
#ifdef _WIN32
#define DLSYM(a, b) GetProcAddress(a, b)
#else
#include <dlfcn.h>
#define DLSYM(a, b) dlsym(a, b)
#endif // OS_WINDOWS
#endif // _WIN32
ptr_ConfigGetSharedDataFilepath ConfigGetSharedDataFilepath = nullptr;
ptr_ConfigGetUserConfigPath ConfigGetUserConfigPath = nullptr;

View File

@ -15,7 +15,6 @@ endif(UNIX)
if(WIN32)
set(OSAL_SOURCES osal_files_win32.c)
add_definitions(
-DOS_WINDOWS
-D_CRT_SECURE_NO_WARNINGS
)
endif(WIN32)

View File

@ -33,7 +33,7 @@ extern "C" {
#define OSAL_DIR_SEPARATOR_STR L"/"
#define OSAL_DIR_SEPARATOR_CHAR L'/'
#if defined(OS_WINDOWS)
#if defined(_WIN32)
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#ifndef PATH_MAX

View File

@ -5,7 +5,7 @@
#include "../PluginAPI.h"
#include "../RSP.h"
#ifdef OS_WINDOWS
#ifdef _WIN32
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
#endif