From 6d309751d5ea87280e20bcf2ac6153bc6a610da2 Mon Sep 17 00:00:00 2001 From: ayuanx Date: Tue, 2 Feb 2010 13:09:07 +0000 Subject: [PATCH] This fixes some of the crash-on-stop when your joypad is plugged in. The problem is that there is no cheap method to do communications between two DLLs that employ the same device. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4992 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp index b7c10c4afb..3a68d8cce6 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp @@ -318,12 +318,17 @@ void Shutdown() INFO_LOG(WIIMOTE, "ShutDown"); ResetVariables(); +// We can't close it here or it might crash +// because the joystick could have been closed already in GCPad +// But there is no easy way to know the situation of another DLL +// So we just skip the close procedure here +/* // Close joypads Close_Devices(); // Finally close SDL if (SDL_WasInit(0)) SDL_Quit(); - +*/ g_SearchDeviceDone = false; }