From: Neal Gompa Date: Thu, 13 May 2010 07:35:07 +0000 (-0500) Subject: Fixed 'OpenGL_Windows.cpp' to work on Linux and Windows; Fixed 'Sources/CMakeLists... X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=2fea8aa4d67ff70b015a34eb058a5e598b3d737d;p=lugaru.git Fixed 'OpenGL_Windows.cpp' to work on Linux and Windows; Fixed 'Sources/CMakeLists.txt' for Windows build --- 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 // --------------------------------------------------------------------------