diff options
| author | Glenn Rice <glennricster@gmail.com> | 2011-03-02 15:13:13 +0000 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2011-03-02 15:13:13 +0000 |
| commit | 3ffdcf1aecddd26ab1ef2b6cd84ca0150dd78ea5 (patch) | |
| tree | 6a05dbea55003d4c1bebe34ccfcfff2991b7ca8f /Source/Plugins/Plugin_VideoDX11/Src/main.cpp | |
| parent | a1055bf5bf18bd79a33d29f3c0db69f537f2e1d9 (diff) | |
Put the video prepare code back, and use the existence of the g_renderer to determine if video prepare has been run or not.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7274 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX11/Src/main.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoDX11/Src/main.cpp | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp index 42782451fe..d77836f4e5 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/main.cpp @@ -174,6 +174,11 @@ bool VideoBackend::Initialize(void *&window_handle) OSD::AddMessage("Dolphin Direct3D11 Video Backend.", 5000); s_BackendInitialized = true; + return true; +} + +void VideoBackend::Video_Prepare() +{ // Better be safe... s_efbAccessRequested = FALSE; s_FifoShuttingDown = FALSE; @@ -198,11 +203,6 @@ bool VideoBackend::Initialize(void *&window_handle) PixelEngine::Init(); DLCache::Init(); - return true; -} - -void VideoBackend::Video_Prepare() -{ // Tell the host that the window is ready Core::Callback_CoreMessage(WM_USER_CREATE); } @@ -211,29 +211,31 @@ void VideoBackend::Shutdown() { s_BackendInitialized = false; - s_efbAccessRequested = FALSE; - s_FifoShuttingDown = FALSE; - s_swapRequested = FALSE; - - // VideoCommon - DLCache::Shutdown(); - Fifo_Shutdown(); - CommandProcessor::Shutdown(); - PixelShaderManager::Shutdown(); - VertexShaderManager::Shutdown(); - OpcodeDecoder_Shutdown(); - VertexLoaderManager::Shutdown(); - - // internal interfaces - D3D::ShutdownUtils(); - PixelShaderCache::Shutdown(); - VertexShaderCache::Shutdown(); - delete g_vertex_manager; - delete g_texture_cache; - delete g_renderer; + if (g_renderer) + { + s_efbAccessRequested = FALSE; + s_FifoShuttingDown = FALSE; + s_swapRequested = FALSE; + + // VideoCommon + DLCache::Shutdown(); + Fifo_Shutdown(); + CommandProcessor::Shutdown(); + PixelShaderManager::Shutdown(); + VertexShaderManager::Shutdown(); + OpcodeDecoder_Shutdown(); + VertexLoaderManager::Shutdown(); + + // internal interfaces + D3D::ShutdownUtils(); + PixelShaderCache::Shutdown(); + VertexShaderCache::Shutdown(); + delete g_vertex_manager; + delete g_texture_cache; + delete g_renderer; + g_renderer = NULL; + } EmuWindow::Close(); - - s_BackendInitialized = false; } } |
