Skip to content

Commit

Permalink
- DSkippableScreenJob::OnEvent(): Ensure previously ignored keys do…
Browse files Browse the repository at this point in the history
…n't cause a screenjob to skip.

* Volume up/down on the keyboard when trying to listen to a cut-scene shouldn't skip it.
  • Loading branch information
mjr4077au committed Apr 20, 2021
1 parent a919e52 commit 321bfe8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/core/screenjob.cpp
Expand Up @@ -61,8 +61,13 @@ bool DSkippableScreenJob::OnEvent(event_t* evt)
{
if (evt->type == EV_KeyDown)
{
state = skipped;
Skipped();
auto& key = evt->data1;
bool ignoredkeys = key == KEY_VOLUMEDOWN || key == KEY_VOLUMEUP || (key > KEY_LASTJOYBUTTON && key < KEY_PAD_LTHUMB_RIGHT);
if (!ignoredkeys)
{
state = skipped;
Skipped();
}
}
return true;
}
Expand Down

1 comment on commit 321bfe8

@coelckers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs a better approach because there's other places, too, where skip keys are checked. A global checker function may be better.

Please sign in to comment.