If the DSP LLE can not find the needed ROM files exit the emulator without crashing the application. Also reimplement soren's revision 7195 in a way that works on linux and windows. (This makes it easier to clean up the video backend if the DSP emulator fails to initialize.)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7271 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-03-02 05:16:49 +00:00
parent 6073600084
commit 3af93e8cf3
12 changed files with 163 additions and 115 deletions

View File

@ -176,14 +176,12 @@ bool VideoBackend::Initialize(void *&window_handle)
OSD::AddMessage("Dolphin OpenGL Video Backend.", 5000);
s_BackendInitialized = true;
return true;
}
// This is called after Initialize() from the Core
// Run from the graphics thread
void VideoBackend::Video_Prepare()
{
OpenGL_MakeCurrent();
if (!OpenGL_MakeCurrent())
{
ERROR_LOG(VIDEO, "Unable to connect to OpenGL context.");
OpenGL_Shutdown();
return false;
}
g_renderer = new Renderer;
@ -210,6 +208,22 @@ void VideoBackend::Video_Prepare()
TextureConverter::Init();
DLCache::Init();
if (!OpenGL_ReleaseContext())
{
ERROR_LOG(VIDEO, "Unable to release OpenGL context.");
Shutdown();
return false;
}
return true;
}
// This is called after Initialize() from the Core
// Run from the graphics thread
void VideoBackend::Video_Prepare()
{
OpenGL_MakeCurrent();
// Notify the core that the video backend is ready
Core::Callback_CoreMessage(WM_USER_CREATE);
}