Bail if not actually SDL 1.2.6.
This commit is contained in:
@@ -484,6 +484,19 @@ RageDisplay *CreateDisplay()
|
||||
RageException::Throw( error );
|
||||
}
|
||||
|
||||
static void CheckSDLVersion( int major, int minor, int patch )
|
||||
{
|
||||
const SDL_version *ver = SDL_Linked_Version();
|
||||
if( ver->major > major ||
|
||||
(ver->major == major && ver->minor > minor) ||
|
||||
(ver->major == major && ver->minor == minor && ver->patch >= patch))
|
||||
return;
|
||||
|
||||
RageException::Throw( "SDL %i.%i.%i is required, but you only appear to "
|
||||
"have SDL %i.%i.%i installed. Please upgrade your installation of SDL or download "
|
||||
"it from:\n\n\thttp://www.libsdl.org/",
|
||||
major, minor, patch, ver->major, ver->minor, ver->patch );
|
||||
}
|
||||
|
||||
static void RestoreAppPri()
|
||||
{
|
||||
@@ -546,6 +559,8 @@ int main(int argc, char* argv[])
|
||||
if( PREFSMAN->m_bShowLogWindow )
|
||||
LOG->ShowConsole();
|
||||
|
||||
CheckSDLVersion( 1,2,6 );
|
||||
|
||||
/* This should be done after PREFSMAN is set up, so it can use HOOKS->MessageBoxOK,
|
||||
* but before we do more complex things that might crash. */
|
||||
HOOKS->DumpDebugInfo();
|
||||
|
||||
Reference in New Issue
Block a user