mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-22 04:31:15 +00:00
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:
parent
980937db1a
commit
0a945baff1
2 changed files with 6 additions and 1 deletions
|
@ -85,6 +85,9 @@ include_directories(${OPENAL_INCLUDE_DIR})
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
include_directories(${OPENGL_INCLUDE_DIR})
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
|
|
||||||
|
find_package(SDL REQUIRED)
|
||||||
|
include_directories(${SDL_INCLUDE_DIR})
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
add_definitions(-DXTHREADS)
|
add_definitions(-DXTHREADS)
|
||||||
|
@ -694,6 +697,7 @@ if (CORE)
|
||||||
${VORBIS_LIBRARIES}
|
${VORBIS_LIBRARIES}
|
||||||
${CURL_LIBRARY}
|
${CURL_LIBRARY}
|
||||||
${JPEG_LIBRARY}
|
${JPEG_LIBRARY}
|
||||||
|
${SDL_LIBRARY}
|
||||||
${sys_libs}
|
${sys_libs}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -716,6 +720,7 @@ if (DEDICATED)
|
||||||
${VORBIS_LIBRARIES}
|
${VORBIS_LIBRARIES}
|
||||||
${CURL_LIBRARY}
|
${CURL_LIBRARY}
|
||||||
${JPEG_LIBRARY}
|
${JPEG_LIBRARY}
|
||||||
|
${SDL_LIBRARY}
|
||||||
${sys_libs}
|
${sys_libs}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -120,7 +120,7 @@ public:
|
||||||
// Initialize everything.
|
// Initialize everything.
|
||||||
// if the OS allows, pass argc/argv directly (without executable name)
|
// if the OS allows, pass argc/argv directly (without executable name)
|
||||||
// otherwise pass the command line in a single string (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.
|
// Shuts down everything.
|
||||||
virtual void Shutdown( void ) = 0;
|
virtual void Shutdown( void ) = 0;
|
||||||
|
|
Loading…
Reference in a new issue