Compare commits

..

2 Commits

Author SHA1 Message Date
briaguya
06793d6f86
Merge 916537e24d into 4abd0fe720 2024-06-21 15:54:37 -04:00
briaguya
916537e24d feat: allow configuring menu accept/apply buttons 2024-06-17 03:19:21 -04:00
2 changed files with 0 additions and 18 deletions

View File

@ -54,9 +54,6 @@ enum class InputType {
}; };
void set_scanned_input(recomp::InputField value) { void set_scanned_input(recomp::InputField value) {
if (value.input_type == 4) {
printf("scanned input for analog");
}
scanning_device.store(recomp::InputDevice::COUNT); scanning_device.store(recomp::InputDevice::COUNT);
scanned_input.store(value); scanned_input.store(value);
} }

View File

@ -164,21 +164,6 @@ static bool cont_active = true;
static recomp::InputDevice cur_device = recomp::InputDevice::Controller; static recomp::InputDevice cur_device = recomp::InputDevice::Controller;
void recomp::finish_scanning_input(recomp::InputField scanned_field) { void recomp::finish_scanning_input(recomp::InputField scanned_field) {
if (scanned_input_index == static_cast<int>(GameInput::ACCEPT_MENU) && (
// scanned_field.input_type == 4 /* magic number: InputType::ControllerAnalog */ || (
// https://github.com/Zelda64Recomp/Zelda64Recomp/issues/411
scanned_field.input_type == 3 /* magic number: InputType::ControllerDigital */ && (
scanned_field.input_id == SDL_GameControllerButton::SDL_CONTROLLER_BUTTON_DPAD_UP ||
scanned_field.input_id == SDL_GameControllerButton::SDL_CONTROLLER_BUTTON_DPAD_DOWN ||
scanned_field.input_id == SDL_GameControllerButton::SDL_CONTROLLER_BUTTON_DPAD_LEFT ||
scanned_field.input_id == SDL_GameControllerButton::SDL_CONTROLLER_BUTTON_DPAD_RIGHT
)
// )
)) {
start_scanning_input(cur_device);
return;
}
recomp::set_input_binding(static_cast<recomp::GameInput>(scanned_input_index), scanned_binding_index, cur_device, scanned_field); recomp::set_input_binding(static_cast<recomp::GameInput>(scanned_input_index), scanned_binding_index, cur_device, scanned_field);
scanned_input_index = -1; scanned_input_index = -1;
scanned_binding_index = -1; scanned_binding_index = -1;