summaryrefslogtreecommitdiff
path: root/src/sys/sys_main.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2007-11-28 01:29:19 +0000
committerTim Angus <tim@ngus.net>2007-11-28 01:29:19 +0000
commit8ae105ea923749d62c707160f87972182b00d42d (patch)
tree51abbd27a5fc57c0b593b83ead4d3871a017b91d /src/sys/sys_main.c
parentac0f597e31c7ef74796fb13f9c3a6336e315f202 (diff)
* Merge ioq3-r1220
Diffstat (limited to 'src/sys/sys_main.c')
-rw-r--r--src/sys/sys_main.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c
index 32c55e37..512c43b8 100644
--- a/src/sys/sys_main.c
+++ b/src/sys/sys_main.c
@@ -587,21 +587,29 @@ int main( int argc, char **argv )
char commandLine[ MAX_STRING_CHARS ] = { 0 };
#ifndef DEDICATED
- const SDL_version *ver = SDL_Linked_Version( );
+ // SDL version check
+
+ // Compile time
+# if !SDL_VERSION_ATLEAST(MINSDL_MAJOR,MINSDL_MINOR,MINSDL_PATCH)
+# error A more recent version of SDL is required
+# endif
+
+ // Run time
+ const SDL_version *ver = SDL_Linked_Version( );
#define STRING(s) #s
#define XSTRING(s) STRING(s)
#define MINSDL_VERSION \
- XSTRING(MINSDL_MAJOR) "." \
- XSTRING(MINSDL_MINOR) "." \
- XSTRING(MINSDL_PATCH)
-
- if( SDL_VERSIONNUM( ver->major, ver->minor, ver->patch ) <
- SDL_VERSIONNUM( MINSDL_MAJOR, MINSDL_MINOR, MINSDL_PATCH ) )
- {
- Sys_Print( "SDL version " MINSDL_VERSION " or greater required\n" );
- Sys_Exit( 1 );
- }
+ XSTRING(MINSDL_MAJOR) "." \
+ XSTRING(MINSDL_MINOR) "." \
+ XSTRING(MINSDL_PATCH)
+
+ if( SDL_VERSIONNUM( ver->major, ver->minor, ver->patch ) <
+ SDL_VERSIONNUM( MINSDL_MAJOR, MINSDL_MINOR, MINSDL_PATCH ) )
+ {
+ Sys_Print( "SDL version " MINSDL_VERSION " or greater required\n" );
+ Sys_Exit( 1 );
+ }
#endif
Sys_ParseArgs( argc, argv );