Shut down the video software plugin without closing dolphin in Windows. Fixed a memory leak.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5162 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
donkopunchstania 2010-03-06 03:25:06 +00:00
parent d69478e539
commit 6376645b69
2 changed files with 6 additions and 4 deletions

View File

@ -201,14 +201,15 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
case WM_CLOSE: case WM_CLOSE:
if (m_hParent == NULL) if (m_hParent == NULL)
{ {
// Simple hack to easily exit without stopping. Hope to fix the stopping errors soon. // Take it out of fullscreen and stop the game
ExitProcess(0); if( g_Config.bFullscreen )
ToggleFullscreen(m_hParent);
PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
} }
break; break;
case WM_DESTROY: case WM_DESTROY:
//Shutdown(); Shutdown();
//PostQuitMessage( 0 ); // Call WM_QUIT
break; break;
// Called when a screensaver wants to show up while this window is active // Called when a screensaver wants to show up while this window is active

View File

@ -98,6 +98,7 @@ void EmuStateChange(PLUGIN_EMUSTATE newState)
void Shutdown(void) void Shutdown(void)
{ {
Renderer::Shutdown();
OpenGL_Shutdown(); OpenGL_Shutdown();
} }