diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp index 133465fe6a..ee7bad6599 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp @@ -201,14 +201,15 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam ) case WM_CLOSE: if (m_hParent == NULL) { - // Simple hack to easily exit without stopping. Hope to fix the stopping errors soon. - ExitProcess(0); + // Take it out of fullscreen and stop the game + if( g_Config.bFullscreen ) + ToggleFullscreen(m_hParent); + PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0); } break; case WM_DESTROY: - //Shutdown(); - //PostQuitMessage( 0 ); // Call WM_QUIT + Shutdown(); break; // Called when a screensaver wants to show up while this window is active diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/main.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/main.cpp index 6640f1faa5..c53bb5c6a5 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/main.cpp @@ -98,6 +98,7 @@ void EmuStateChange(PLUGIN_EMUSTATE newState) void Shutdown(void) { + Renderer::Shutdown(); OpenGL_Shutdown(); }