mirror of https://github.com/stella-emu/stella.git
Catch very early fatal warning from SDL when it can't even initialize itself.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3094 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
c8400dcfe6
commit
fb4332a0c7
|
@ -47,7 +47,7 @@ FrameBufferSDL2::FrameBufferSDL2(OSystem& osystem)
|
|||
ostringstream buf;
|
||||
buf << "ERROR: Couldn't initialize SDL: " << SDL_GetError() << endl;
|
||||
myOSystem.logMessage(buf.str(), 0);
|
||||
return;
|
||||
throw "FATAL ERROR";
|
||||
}
|
||||
myOSystem.logMessage("FrameBufferSDL2::FrameBufferSDL2 SDL_Init()", 2);
|
||||
|
||||
|
|
|
@ -120,7 +120,8 @@ bool OSystem::create()
|
|||
// Get relevant information about the video hardware
|
||||
// This must be done before any graphics context is created, since
|
||||
// it may be needed to initialize the size of graphical objects
|
||||
myFrameBuffer = MediaFactory::createVideo(*this);
|
||||
try { myFrameBuffer = MediaFactory::createVideo(*this); }
|
||||
catch(...) { return false; }
|
||||
if(!myFrameBuffer->initialize())
|
||||
return false;
|
||||
|
||||
|
@ -174,8 +175,10 @@ void OSystem::loadConfig()
|
|||
void OSystem::saveConfig()
|
||||
{
|
||||
// Ask all subsystems to save their settings
|
||||
if(myFrameBuffer)
|
||||
myFrameBuffer->tiaSurface().ntsc().saveConfig(*mySettings);
|
||||
|
||||
if(mySettings)
|
||||
mySettings->saveConfig();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue