1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Correct OS names in code and project files.

This commit is contained in:
Sergey Lipskiy 2014-10-13 14:57:14 +07:00
parent 41da318afa
commit 93d03d0e1a
13 changed files with 45 additions and 30 deletions

View File

@ -39,7 +39,7 @@ if(MUPENPLUSAPI)
-DMUPENPLUSAPI -DMUPENPLUSAPI
) )
include_directories( inc ) include_directories( inc )
set(GLideN64_SOURCES_LINUX set(GLideN64_SOURCES_UNIX
MupenPlusPluginAPI.cpp MupenPlusPluginAPI.cpp
mupenplus/Config.cpp mupenplus/Config.cpp
mupenplus/CommonAPIImpl_mupenplus.cpp mupenplus/CommonAPIImpl_mupenplus.cpp
@ -47,7 +47,7 @@ if(MUPENPLUSAPI)
mupenplus/MupenPlusAPIImpl.cpp mupenplus/MupenPlusAPIImpl.cpp
mupenplus/OpenGL_mupenplus.cpp mupenplus/OpenGL_mupenplus.cpp
) )
set(GLideN64_SOURCES_WIN ${GLideN64_SOURCES_LINUX} set(GLideN64_SOURCES_WIN ${GLideN64_SOURCES_UNIX}
windows/GLFunctions.cpp windows/GLFunctions.cpp
) )
else(MUPENPLUSAPI) else(MUPENPLUSAPI)
@ -63,7 +63,7 @@ else(MUPENPLUSAPI)
windows/OpenGL_windows.cpp windows/OpenGL_windows.cpp
windows/ZilmarAPIImpl_windows.cpp windows/ZilmarAPIImpl_windows.cpp
) )
set(GLideN64_SOURCES_LINUX set(GLideN64_SOURCES_UNIX
ZilmarPluginAPI.cpp ZilmarPluginAPI.cpp
common/ZilmarAPIImpl_common.cpp common/ZilmarAPIImpl_common.cpp
posix/Config.cpp posix/Config.cpp
@ -76,9 +76,18 @@ else(MUPENPLUSAPI)
endif(MUPENPLUSAPI) endif(MUPENPLUSAPI)
if(UNIX) if(UNIX)
list(APPEND GLideN64_SOURCES ${GLideN64_SOURCES_LINUX}) list(APPEND GLideN64_SOURCES ${GLideN64_SOURCES_UNIX})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_definitions(
-DOS_MAC_OS_X
)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(
-DOS_LINUX
)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if( NOT MUPENPLUSAPI)
add_definitions( add_definitions(
-D__LINUX__
-D_DEBUG -D_DEBUG
) )
find_package(PkgConfig) find_package(PkgConfig)
@ -86,15 +95,16 @@ if(UNIX)
include_directories(${GLIB_INCLUDE_DIRS}) include_directories(${GLIB_INCLUDE_DIRS})
find_package(GTK2 REQUIRED) find_package(GTK2 REQUIRED)
include_directories(${GTK2_INCLUDE_DIRS}) include_directories(${GTK2_INCLUDE_DIRS})
endif( NOT MUPENPLUSAPI)
endif(UNIX) endif(UNIX)
if(WIN32) if(WIN32)
list(APPEND GLideN64_SOURCES ${GLideN64_SOURCES_WIN}) list(APPEND GLideN64_SOURCES ${GLideN64_SOURCES_WIN})
add_definitions( add_definitions(
-D_WINDOWS -DOS_WINDOWS
-D__WIN32__ -D__WIN32__
-DWIN32 -DWIN32
-D_WIN32_ -D_WIN32_ASM
-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS
-D__MSC__ -D__MSC__
) )

View File

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

View File

@ -113,7 +113,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32_ASM;_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild> <MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@ -137,7 +137,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus|Win32'">
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>MUPENPLUSAPI;WIN32;_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>MUPENPLUSAPI;WIN32;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild> <MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@ -166,7 +166,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<PreprocessorDefinitions>WIN32_ASM;_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
@ -194,7 +194,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<PreprocessorDefinitions>MUPENPLUSAPI;WIN32;WIN32_ASM;_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>MUPENPLUSAPI;WIN32;WIN32_ASM;OS_WINDOWS;_USRDLL;NEWGLNINTENDO64_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>

View File

@ -2,7 +2,7 @@
#define OPENGL_H #define OPENGL_H
#include <vector> #include <vector>
#ifdef _WINDOWS #ifdef OS_WINDOWS
#include <windows.h> #include <windows.h>
#include <GL/gl.h> #include <GL/gl.h>
#include "glext.h" #include "glext.h"
@ -16,13 +16,18 @@
#define GL_READ_FRAMEBUFFER GL_FRAMEBUFFER #define GL_READ_FRAMEBUFFER GL_FRAMEBUFFER
#else #else
#define GL_GLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES
#if defined(OS_MAC_OS_X)
#include <OpenGL/OpenGL.h>
#include <OpenGL/glext.h>
#elif defined(OS_LINUX)
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glext.h> #include <GL/glext.h>
#endif // OS_MAC_OS_X
#endif // GLES2 #endif // GLES2
#ifdef USE_SDL #ifdef USE_SDL
#include <SDL.h> #include <SDL.h>
#endif // USE_SDL #endif // USE_SDL
#endif // _WINDOWS #endif // OS_WINDOWS
#include "gSP.h" #include "gSP.h"

View File

@ -240,7 +240,7 @@ void RSP_ProcessDList()
void RSP_Init() void RSP_Init()
{ {
#ifdef _WINDOWS #ifdef OS_WINDOWS
// Calculate RDRAM size by intentionally causing an access violation // Calculate RDRAM size by intentionally causing an access violation
u32 test; u32 test;
try try
@ -255,9 +255,9 @@ void RSP_Init()
RDRAMSize = 0x7FFFFF; RDRAMSize = 0x7FFFFF;
else else
RDRAMSize = 0x3FFFFF; RDRAMSize = 0x3FFFFF;
#else // _WINDOWS #else // OS_WINDOWS
RDRAMSize = 1024 * 1024 * 8; RDRAMSize = 1024 * 1024 * 8;
#endif // _WINDOWS #endif // OS_WINDOWS
RSP.DList = 0; RSP.DList = 0;
RSP.uc_start = RSP.uc_dstart = 0; RSP.uc_start = RSP.uc_dstart = 0;

View File

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

View File

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

View File

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

View File

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

View File

@ -175,7 +175,7 @@ void Config_SetOption(char* line, char* val)
{ {
for (int i = 0; i< configOptionsSize; i++) { for (int i = 0; i< configOptionsSize; i++) {
Option *o = &configOptions[i]; Option *o = &configOptions[i];
#ifndef _WINDOWS #ifndef OS_WINDOWS
if (strcasecmp(line, o->name) == 0) { if (strcasecmp(line, o->name) == 0) {
#else #else
if (_stricmp(line, o->name) == 0) { if (_stricmp(line, o->name) == 0) {

View File

@ -3,11 +3,11 @@
#include "../GLideN64.h" #include "../GLideN64.h"
#include "../OpenGL.h" #include "../OpenGL.h"
#ifdef _WINDOWS #ifdef OS_WINDOWS
#define DLSYM(a, b) GetProcAddress(a, b) #define DLSYM(a, b) GetProcAddress(a, b)
#else #else
#define DLSYM(a, b) dlsym(a, b) #define DLSYM(a, b) dlsym(a, b)
#endif // _WINDOWS #endif // OS_WINDOWS
ptr_ConfigGetSharedDataFilepath ConfigGetSharedDataFilepath = NULL; ptr_ConfigGetSharedDataFilepath ConfigGetSharedDataFilepath = NULL;
ptr_ConfigGetUserConfigPath ConfigGetUserConfigPath = NULL; ptr_ConfigGetUserConfigPath ConfigGetUserConfigPath = NULL;

View File

@ -7,7 +7,7 @@
#include "../Config.h" #include "../Config.h"
#include "../Revision.h" #include "../Revision.h"
#ifndef _WINDOWS #ifndef OS_WINDOWS
void initGLFunctions() void initGLFunctions()
{ {

View File

@ -1,4 +1,4 @@
#if defined(USE_DEBUG) && defined(_WINDOWS) #if defined(USE_DEBUG) && defined(OS_WINDOWS)
#include "GLideN64_Windows.h" #include "GLideN64_Windows.h"
#include <stdio.h> #include <stdio.h>