mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-08 13:11:02 +00:00
[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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user