diff options
author | Arisotura <thetotalworm@gmail.com> | 2019-06-11 18:57:22 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2019-06-11 18:57:22 +0200 |
commit | 4447e010d7516a0799c17e8e249bc4f5384a3daa (patch) | |
tree | efabef6aba515989bdf2d56f998fafc6f14a1aa7 | |
parent | b9183b8818bc88ffac597942c7a39d6b459679aa (diff) |
actually save the current joystick ID
-rw-r--r-- | src/libui_sdl/DlgInputConfig.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libui_sdl/DlgInputConfig.cpp b/src/libui_sdl/DlgInputConfig.cpp index c2059d1..d3ef2f4 100644 --- a/src/libui_sdl/DlgInputConfig.cpp +++ b/src/libui_sdl/DlgInputConfig.cpp @@ -318,6 +318,10 @@ int OnCloseWindow(uiWindow* window, void* blarg) InputDlgData* dlg = (InputDlgData*)(uiControl(window)->UserData); openedmask &= ~(1 << dlg->type); if (dlg->timer) SDL_RemoveTimer(dlg->timer); + + JoystickID = Config::JoystickID; + OpenJoystick(); + return 1; } @@ -340,6 +344,9 @@ void OnCancel(uiButton* btn, void* data) uiControlDestroy(uiControl(dlg->win)); openedmask &= ~(1 << dlg->type); if (dlg->timer) SDL_RemoveTimer(dlg->timer); + + JoystickID = Config::JoystickID; + OpenJoystick(); } void OnOk(uiButton* btn, void* data) @@ -357,6 +364,8 @@ void OnOk(uiButton* btn, void* data) memcpy(Config::HKJoyMapping, dlg->joymap, sizeof(int)*HK_MAX); } + Config::JoystickID = JoystickID; + Config::Save(); uiControlDestroy(uiControl(dlg->win)); |