mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 15:22:45 +01:00
debug_pad: Avoid loading input for nonexistent buttons (Home and Screenshot)
Prevents memory exceptions when the debug pad is enabled.
This commit is contained in:
parent
50d2abaaa9
commit
b358e88512
1 changed files with 3 additions and 2 deletions
|
@ -71,8 +71,9 @@ void Controller_DebugPad::OnUpdate(u8* data, std::size_t size) {
|
||||||
|
|
||||||
void Controller_DebugPad::OnLoadInputDevices() {
|
void Controller_DebugPad::OnLoadInputDevices() {
|
||||||
std::transform(Settings::values.debug_pad_buttons.begin(),
|
std::transform(Settings::values.debug_pad_buttons.begin(),
|
||||||
Settings::values.debug_pad_buttons.end(), buttons.begin(),
|
Settings::values.debug_pad_buttons.begin() +
|
||||||
Input::CreateDevice<Input::ButtonDevice>);
|
Settings::NativeButton::NUM_BUTTONS_HID,
|
||||||
|
buttons.begin(), Input::CreateDevice<Input::ButtonDevice>);
|
||||||
std::transform(Settings::values.debug_pad_analogs.begin(),
|
std::transform(Settings::values.debug_pad_analogs.begin(),
|
||||||
Settings::values.debug_pad_analogs.end(), analogs.begin(),
|
Settings::values.debug_pad_analogs.end(), analogs.begin(),
|
||||||
Input::CreateDevice<Input::AnalogDevice>);
|
Input::CreateDevice<Input::AnalogDevice>);
|
||||||
|
|
Loading…
Reference in a new issue