From 5341bbad3acb3f52d0151083c243913f00061e7c Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sun, 6 Jun 2010 03:52:11 +0000 Subject: Made new Wiimote plugin not deinit SDL on shutdown. (Hacks, same thing old wiimote does, fixes the crash on emulation stop, refresh button still causes crash (damn SDL)) Minor new input plugin GUI changes. (left-click on rumble button opens control config dialog) Made NetPlay save/load settings to Dolphin.ini. Allow NetPlay host to adjust which/how many pads will be used in game. (more than one gamepad per Dolphin instance can be used on NetPlay) Worked on wiimote NetPlay a bit. (still nonfunctional) Improved SDL device numbering. Added some major hacks to ControllerInterface/SDL so XInput(360 controller) devices do not have their SDL interface shown in the device list on windows. (caused confusion for users) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5625 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Src/ControllerInterface/ControllerInterface.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp') diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp index 3ad2c00e18..35b006a211 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp @@ -57,7 +57,7 @@ void ControllerInterface::Init() // // remove all devices/ call library cleanup functions // -void ControllerInterface::DeInit() +void ControllerInterface::DeInit(const bool hacks_no_sdl_quit) { if ( false == m_is_init ) return; @@ -73,6 +73,13 @@ void ControllerInterface::DeInit() (*d)->SetOutputState( *o, 0 ); // update output (*d)->UpdateOutput(); + + // TODO: remove this + // major hacks to prevent gcpad/wiimote new from crashing eachother + if (hacks_no_sdl_quit) + if ((*d)->GetSource() == "SDL") + continue; + //delete device delete *d; } @@ -92,8 +99,9 @@ void ControllerInterface::DeInit() ciface::OSX::DeInit(); #endif #ifdef CIFACE_USE_SDL - // there seems to be some sort of memory leak with SDL, quit isn't freeing everything up - SDL_Quit(); + // TODO: there seems to be some sort of memory leak with SDL, quit isn't freeing everything up + if (false == hacks_no_sdl_quit) + SDL_Quit(); #endif m_is_init = false; -- cgit v1.2.3