input: fix double press issue when assigning a bind (#2895)

This commit is contained in:
Tyler Wilding 2023-08-09 20:50:02 -06:00 committed by GitHub
parent 3923f68fae
commit 8ce31e5a4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View file

@ -122,8 +122,6 @@ void KeyboardDevice::process_event(const SDL_Event& event,
// modifiers are instead inspected on a KEYUP, however if it's one of the keys
// for triggering the binding assignment, and it's the first time we've seen it -- we ignore
// it
// TODO - `seen_confirm_up` should already be true if they didn't press that key
// this is preventing setting modifiers as keys
if (!bind_assignment->seen_confirm_up) {
for (const auto& confirm_bind : bind_assignment->keyboard_confirmation_binds) {
if (confirm_bind.sdl_idx == key_event.keysym.sym) {

View file

@ -435,8 +435,7 @@ void InputManager::set_wait_for_bind(const InputDeviceType device_type,
m_waiting_for_bind->keyboard_confirmation_binds =
m_settings->keyboard_binds.lookup_button_binds(PadData::CROSS);
if (g_game_version == GameVersion::Jak1) {
auto& circle_binds = m_waiting_for_bind->keyboard_confirmation_binds =
m_settings->keyboard_binds.lookup_button_binds(PadData::CIRCLE);
auto circle_binds = m_settings->keyboard_binds.lookup_button_binds(PadData::CIRCLE);
m_waiting_for_bind->keyboard_confirmation_binds.insert(
m_waiting_for_bind->keyboard_confirmation_binds.end(), circle_binds.begin(),
circle_binds.end());