Initial SDL setup

Use SDL_main on all platforms.
Fix main() for non-const argv so it matches with the SDL
prototype.
Adapt win32 WinMain() to main() and get rid of the win32 special
case in Common::Init().
This commit is contained in:
dhewg 2011-12-20 16:12:17 +01:00 committed by Daniel Gibson
parent 980937db1a
commit 0a945baff1
2 changed files with 6 additions and 1 deletions

View file

@ -85,6 +85,9 @@ include_directories(${OPENAL_INCLUDE_DIR})
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
find_package(SDL REQUIRED)
include_directories(${SDL_INCLUDE_DIR})
if (UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
add_definitions(-DXTHREADS)
@ -694,6 +697,7 @@ if (CORE)
${VORBIS_LIBRARIES}
${CURL_LIBRARY}
${JPEG_LIBRARY}
${SDL_LIBRARY}
${sys_libs}
)
endif()
@ -716,6 +720,7 @@ if (DEDICATED)
${VORBIS_LIBRARIES}
${CURL_LIBRARY}
${JPEG_LIBRARY}
${SDL_LIBRARY}
${sys_libs}
)
endif()

View file

@ -120,7 +120,7 @@ public:
// Initialize everything.
// if the OS allows, pass argc/argv directly (without executable name)
// otherwise pass the command line in a single string (without executable name)
virtual void Init( int argc, const char **argv, const char *cmdline ) = 0;
virtual void Init( int argc, char **argv ) = 0;
// Shuts down everything.
virtual void Shutdown( void ) = 0;