-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
InputManager: Fix exit menu button forwarding to game
Backport of stenzek/duckstation@a7f2ad3
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -963,7 +963,7 @@ bool InputManager::ProcessEvent(InputBindingKey key, float value, bool skip_butt | |
// and 0 on release (when the full state changes). | ||
if (IsAxisHandler(binding->handler)) | ||
{ | ||
if (value_to_pass >= 0.0f) | ||
if (value_to_pass >= 0.0f && (!skip_button_handlers || value_to_pass == 0.0f)) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
stenzek
Author
Contributor
|
||
std::get<InputAxisEventHandler>(binding->handler)(value_to_pass); | ||
} | ||
else if (binding->num_keys >= min_num_keys) | ||
|
This might be pedantic, but for a minimal boolean expression (so you don't check for equality twice) you could use the following expression (I've checked it using a truth table and a k-map):