summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSoren Jorvang <soren.jorvang@gmail.com>2011-02-19 01:23:56 +0000
committerSoren Jorvang <soren.jorvang@gmail.com>2011-02-19 01:23:56 +0000
commitc6c0137df42407f8a69bb9a4bae546bcefb28dc6 (patch)
tree32cd4e08952586076af5c674fff409bcc318ea65 /Source
parent198e29be07879aef8f79888572f5571c1b879624 (diff)
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
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/main.cpp6
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/main.cpp7
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/main.cpp20
3 files changed, 13 insertions, 20 deletions
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp
index b1ee66bda0..e440bc16af 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp
@@ -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);
}
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
index 340d72f80c..cca6ed9753 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
@@ -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);
}
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
index a422cebe9e..9d2433f759 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
@@ -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()