mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-29 14:36:46 +00:00
core: hid: emulated_console: Avoid a crash if frontend does not configure touch_from_button_maps.
This commit is contained in:
parent
c3af6d8372
commit
05c709bebe
|
@ -40,6 +40,11 @@ void EmulatedConsole::SetTouchParams() {
|
||||||
touch_params[index++] = std::move(touchscreen_param);
|
touch_params[index++] = std::move(touchscreen_param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Settings::values.touch_from_button_maps.empty()) {
|
||||||
|
LOG_WARNING(Input, "touch_from_button_maps is unset by frontend config");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto button_index =
|
const auto button_index =
|
||||||
static_cast<u64>(Settings::values.touch_from_button_map_index.GetValue());
|
static_cast<u64>(Settings::values.touch_from_button_map_index.GetValue());
|
||||||
const auto& touch_buttons = Settings::values.touch_from_button_maps[button_index].buttons;
|
const auto& touch_buttons = Settings::values.touch_from_button_maps[button_index].buttons;
|
||||||
|
|
Loading…
Reference in a new issue