From 2fea8aa4d67ff70b015a34eb058a5e598b3d737d Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Thu, 13 May 2010 02:35:07 -0500 Subject: [PATCH] Fixed 'OpenGL_Windows.cpp' to work on Linux and Windows; Fixed 'Sources/CMakeLists.txt' for Windows build --- Source/CMakeLists.txt | 3 +-- Source/OpenGL_Windows.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index b159c58..3aba8d7 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -52,7 +52,6 @@ set(LUGARU_SRCS unpack.c unpack_private.c Weapons.cpp - MacCompatibility.cpp OpenGL_Windows.cpp openal_wrapper.cpp WinInput.cpp) @@ -63,7 +62,6 @@ set(LUGARU_H Game.h Lights.h LinkedList.h - MacCompatibility.h Models.h Objects.h Person.h @@ -102,6 +100,7 @@ if(CMAKE_HOST_APPLE) set(LUGARU_H ${LUGARU_H} "Carbon Include.h" + MacCompatibility.h CarbonStdCLib.h) endif(CMAKE_HOST_APPLE) diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 15a71f3..ddf9408 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -276,6 +276,21 @@ static int _argc = 0; static char **_argv = NULL; #endif +#ifdef _WIN32 +bool cmdline(const char *cmd) +{ + for (int i = 1; i < _argc; i++) + { + char *arg = _argv[i]; + while (*arg == '-') + arg++; + if (strcasecmp(arg, cmd) == 0) + return true; + } + + return false; +} +#else bool cmdline(const char *cmd) { for (int i = 1; i < _argc; i++) @@ -289,6 +304,7 @@ bool cmdline(const char *cmd) return false; } +#endif // -------------------------------------------------------------------------- -- 2.39.5