mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-21 20:21:19 +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)
|
||||
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()
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue