mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 00:20:59 +00:00
* Compile time and runtime checks for SDL >= 1.2.7
* Modified versioning to play nice with the reverted Makefile change
This commit is contained in:
parent
d5e9f1216e
commit
e56a151a97
4 changed files with 58 additions and 15 deletions
|
@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#ifndef DEDICATED
|
||||
#include "SDL.h"
|
||||
#include "SDL_cpuinfo.h"
|
||||
#endif
|
||||
|
||||
#include "sys_local.h"
|
||||
|
@ -604,6 +605,24 @@ int main( int argc, char **argv )
|
|||
int i;
|
||||
char commandLine[ MAX_STRING_CHARS ] = { 0 };
|
||||
|
||||
#ifndef DEDICATED
|
||||
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 );
|
||||
}
|
||||
#endif
|
||||
|
||||
Sys_ParseArgs( argc, argv );
|
||||
Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) );
|
||||
Sys_SetDefaultInstallPath( DEFAULT_BASEDIR );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue