tr2/option_controls: fix selected layout not saving

Resolves #2830.
This commit is contained in:
lahm86 2025-04-23 15:16:39 +01:00
parent 4d5040d15c
commit 39bf46598c
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,5 @@
## [Unreleased](https://github.com/LostArtefacts/TRX/compare/tr2-1.0...develop) - ××××-××-××
- fixed the selected keyboard/controller layout not being saved (#2830, regression from 1.0)
## [1.0](https://github.com/LostArtefacts/TRX/compare/tr2-0.10...tr2-1.0) - 2025-04-23
- added support for The Golden Mask (#1621)

View file

@ -44,10 +44,11 @@ static void M_HandleLayoutChange(const EVENT *event, void *user_data)
const M_PRIV *const p = user_data;
switch (p->ui.state.backend) {
case INPUT_BACKEND_KEYBOARD:
g_Config.input.keyboard_layout = p->ui.state.active_layout;
g_Config.input.keyboard_layout = p->ui.state.editor_state.active_layout;
break;
case INPUT_BACKEND_CONTROLLER:
g_Config.input.controller_layout = p->ui.state.active_layout;
g_Config.input.controller_layout =
p->ui.state.editor_state.active_layout;
break;
default:
break;