actually save the current joystick ID
This commit is contained in:
parent
b9183b8818
commit
4447e010d7
|
@ -318,6 +318,10 @@ int OnCloseWindow(uiWindow* window, void* blarg)
|
||||||
InputDlgData* dlg = (InputDlgData*)(uiControl(window)->UserData);
|
InputDlgData* dlg = (InputDlgData*)(uiControl(window)->UserData);
|
||||||
openedmask &= ~(1 << dlg->type);
|
openedmask &= ~(1 << dlg->type);
|
||||||
if (dlg->timer) SDL_RemoveTimer(dlg->timer);
|
if (dlg->timer) SDL_RemoveTimer(dlg->timer);
|
||||||
|
|
||||||
|
JoystickID = Config::JoystickID;
|
||||||
|
OpenJoystick();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,6 +344,9 @@ void OnCancel(uiButton* btn, void* data)
|
||||||
uiControlDestroy(uiControl(dlg->win));
|
uiControlDestroy(uiControl(dlg->win));
|
||||||
openedmask &= ~(1 << dlg->type);
|
openedmask &= ~(1 << dlg->type);
|
||||||
if (dlg->timer) SDL_RemoveTimer(dlg->timer);
|
if (dlg->timer) SDL_RemoveTimer(dlg->timer);
|
||||||
|
|
||||||
|
JoystickID = Config::JoystickID;
|
||||||
|
OpenJoystick();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnOk(uiButton* btn, void* data)
|
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);
|
memcpy(Config::HKJoyMapping, dlg->joymap, sizeof(int)*HK_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Config::JoystickID = JoystickID;
|
||||||
|
|
||||||
Config::Save();
|
Config::Save();
|
||||||
|
|
||||||
uiControlDestroy(uiControl(dlg->win));
|
uiControlDestroy(uiControl(dlg->win));
|
||||||
|
|
Loading…
Reference in New Issue