mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user