mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fixed crash: when you try to change pad in config dialog
Fixed issue: XInput trigger source cannot be selected Added proper close of SDL_Joystick But still nJoy and Wiimote cannot share the same gamepad. It needs to be figured out how to do it with SDL. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4686 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -204,7 +204,7 @@ void Initialize(void *init)
|
||||
Called from: The Dolphin Core, PADConfigDialognJoy::OnClose() */
|
||||
void Shutdown()
|
||||
{
|
||||
INFO_LOG(PAD, "Shutdown: %i\n", SDL_WasInit(0));
|
||||
INFO_LOG(PAD, "Shutdown: %i", SDL_WasInit(0));
|
||||
|
||||
// Always change this variable
|
||||
g_EmulatorRunning = false;
|
||||
@ -220,8 +220,8 @@ void Shutdown()
|
||||
vector elements or any bad devices */
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (joyinfo.at(PadMapping[i].ID).Good)
|
||||
if (SDL_WasInit(0) && joyinfo.size() > (u32)PadMapping[i].ID)
|
||||
if (PadState[i].joy && joyinfo.at(PadMapping[i].ID).Good)
|
||||
if(SDL_JoystickOpened(PadMapping[i].ID))
|
||||
{
|
||||
SDL_JoystickClose(PadState[i].joy);
|
||||
@ -235,7 +235,8 @@ void Shutdown()
|
||||
NumGoodPads = 0;
|
||||
|
||||
// Finally close SDL
|
||||
SDL_Quit();
|
||||
if (SDL_WasInit(0))
|
||||
SDL_Quit();
|
||||
|
||||
// Remove the pointer to the initialize data
|
||||
g_PADInitialize = NULL;
|
||||
|
Reference in New Issue
Block a user