diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-06-14 20:48:24 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-06-14 20:48:24 +0200 |
| commit | 60e10327715e420f652ed148e72e22ce8ded55a3 (patch) | |
| tree | 8ab3722ac19e31d61e85e7134ebfe4232b1bc540 /src/yuzu/configuration | |
| parent | 10713532917591445080bee19159447b683b548a (diff) | |
[qt] fix various crashes due to invalid/corrupted/outdated settings (#4070)
lots of "out of index" errors :)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4070
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/yuzu/configuration')
| -rw-r--r-- | src/yuzu/configuration/configure_motion_touch.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/yuzu/configuration/configure_motion_touch.cpp b/src/yuzu/configuration/configure_motion_touch.cpp index d1bcac12aa..2083315c03 100644 --- a/src/yuzu/configuration/configure_motion_touch.cpp +++ b/src/yuzu/configuration/configure_motion_touch.cpp @@ -94,11 +94,10 @@ void ConfigureMotionTouch::SetConfiguration() { const Common::ParamPackage touch_param(Settings::values.touch_device.GetValue()); touch_from_button_maps = Settings::values.touch_from_button_maps; - for (const auto& touch_map : touch_from_button_maps) { + for (const auto& touch_map : touch_from_button_maps) ui->touch_from_button_map->addItem(QString::fromStdString(touch_map.name)); - } - ui->touch_from_button_map->setCurrentIndex( - Settings::values.touch_from_button_map_index.GetValue()); + if (auto const index = Settings::values.touch_from_button_map_index.GetValue(); int(index) < ui->touch_from_button_map->count()) + ui->touch_from_button_map->setCurrentIndex(index); min_x = touch_param.Get("min_x", 100); min_y = touch_param.Get("min_y", 50); |
