Combine the two halves of video backend initialization
in Initialize() and Video_Prepare(). Video_Prepare() then becomes the entry point for associating the current thread with the rendering context, which is currently only known to be necessary for OpenGL. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7195 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
198e29be07
commit
c6c0137df4
|
@ -178,10 +178,7 @@ void VideoBackend::Initialize()
|
|||
|
||||
OSD::AddMessage("Dolphin Direct3D11 Video Backend.", 5000);
|
||||
s_BackendInitialized = true;
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Prepare()
|
||||
{
|
||||
// Better be safe...
|
||||
s_efbAccessRequested = FALSE;
|
||||
s_FifoShuttingDown = FALSE;
|
||||
|
@ -205,7 +202,10 @@ void VideoBackend::Video_Prepare()
|
|||
CommandProcessor::Init();
|
||||
PixelEngine::Init();
|
||||
DLCache::Init();
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Prepare()
|
||||
{
|
||||
// Tell the host that the window is ready
|
||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||
}
|
||||
|
|
|
@ -163,10 +163,6 @@ void VideoBackend::Initialize()
|
|||
|
||||
OSD::AddMessage("Dolphin Direct3D9 Video Backend.", 5000);
|
||||
s_BackendInitialized = true;
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Prepare()
|
||||
{
|
||||
// Better be safe...
|
||||
s_efbAccessRequested = FALSE;
|
||||
s_FifoShuttingDown = FALSE;
|
||||
|
@ -186,7 +182,10 @@ void VideoBackend::Video_Prepare()
|
|||
CommandProcessor::Init();
|
||||
PixelEngine::Init();
|
||||
DLCache::Init();
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Prepare()
|
||||
{
|
||||
// Notify the core that the video backend is ready
|
||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||
}
|
||||
|
|
|
@ -175,18 +175,8 @@ void VideoBackend::Initialize()
|
|||
|
||||
OSD::AddMessage("Dolphin OpenGL Video Backend.", 5000);
|
||||
s_BackendInitialized = true;
|
||||
}
|
||||
|
||||
// This is called after Initialize() from the Core
|
||||
// Run from the graphics thread
|
||||
void VideoBackend::Video_Prepare()
|
||||
{
|
||||
OpenGL_MakeCurrent();
|
||||
//if (!Renderer::Init()) {
|
||||
// g_VideoInitialize.pLog("Renderer::Create failed\n", TRUE);
|
||||
// PanicAlert("Can't create opengl renderer. You might be missing some required opengl extensions, check the logs for more info");
|
||||
// exit(1);
|
||||
//}
|
||||
|
||||
g_renderer = new Renderer;
|
||||
|
||||
|
@ -212,12 +202,16 @@ void VideoBackend::Video_Prepare()
|
|||
VertexLoaderManager::Init();
|
||||
TextureConverter::Init();
|
||||
DLCache::Init();
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
INFO_LOG(VIDEO, "Video backend initialized.");
|
||||
|
||||
}
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
|
|
Loading…
Reference in New Issue