Skip to content

Commit

Permalink
Don't process mouse inputs if there are joystick inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolfering committed Oct 11, 2024
1 parent 5b2958e commit 27f9ed4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Source_Files/Misc/vbl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1206,12 +1206,13 @@ uint32 parse_keymap(void)
hotkey_sequence[2] = 0;
}

auto before_processing_flags = flags;
flags = process_joystick_axes(flags);

// Handle the selected input controller
if (input_preferences->input_device == _mouse_yaw_pitch) {
flags = process_aim_input(flags, pull_mouselook_delta());
}
// Handle the selected input controller
if (before_processing_flags == flags && input_preferences->input_device == _mouse_yaw_pitch) {
flags = process_aim_input(flags, pull_mouselook_delta());
}

// if the user prefers to toggle run/swim, the flag becomes latched
if (input_preferences->modifiers & _inputmod_run_key_toggle)
Expand Down

0 comments on commit 27f9ed4

Please sign in to comment.