Fix a hang on stop on linux (why is that done better on linux ?? strange :P)

Fix what must have been a typo for Pikmin PAL CRC, the game still doesn't work though :(
Fix a crash on stop in nJoy 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3821 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s
2009-07-17 16:20:55 +00:00
parent 8c466e1a62
commit 664f017fec
5 changed files with 35 additions and 27 deletions

View File

@ -302,12 +302,20 @@ void Shutdown()
#ifdef _DEBUG
DEBUG_QUIT();
#endif
#ifdef _WIN32
// Free DInput before closing SDL, or get a crash !
FreeDirectInput();
#elif defined(__linux__)
close(fd);
#endif
// Don't shutdown the gamepad if the configuration window is still showing
// Todo: Coordinate with the Wiimote plugin, SDL_Quit() will remove the pad for it to
#if defined(HAVE_WX) && HAVE_WX
if (m_ConfigFrame) return;
#endif
/* Close all devices carefully. We must check that we are not accessing any undefined
vector elements or any bad devices */
for (int i = 0; i < 4; i++)
@ -331,12 +339,6 @@ void Shutdown()
// Remove the pointer to the initialize data
g_PADInitialize = NULL;
#ifdef _WIN32
FreeDirectInput();
#elif defined(__linux__)
close(fd);
#endif
}