Fixed mem leak caused by not releasing pad & wiimote plugin when shutdown

Fixed main frame crash after shutdown

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4755 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2009-12-30 14:37:12 +00:00
parent 97779ea295
commit 151ff28ab7
10 changed files with 71 additions and 96 deletions

View File

@ -714,7 +714,6 @@ void Shutdown()
g_EmulatorRunning = false;
#ifdef _WIN32
dinput.Free();
// Kill xpad rumble
XINPUT_VIBRATION vib;
vib.wLeftMotorSpeed = 0;
@ -722,6 +721,7 @@ void Shutdown()
for (int i = 0; i < 4; i++)
if (pad[i].bRumble)
XInputSetState(pad[i].XPadPlayer, &vib);
dinput.Free();
#endif
SaveConfig();
}