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:
Soren Jorvang 2011-02-19 01:23:56 +00:00
parent 198e29be07
commit c6c0137df4
3 changed files with 13 additions and 20 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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()