Skip to content

Commit

Permalink
[ionWindow] Fix crash when volume up/down keys pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
iondune committed Feb 6, 2020
1 parent b31028c commit f4158f2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Libraries/ionWindow/CWindowManager.Callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ namespace ion
KeyEvent.Key = ConvertGLFWKeyCode(key);
KeyEvent.Modifiers = mods;

Window->KeyStates[(int) KeyEvent.Key] = KeyEvent.Pressed;
Window->TriggerEvent(KeyEvent);
// Block "Unknown" key presses (e.g. volume up/down)
if (KeyEvent.Key != EKey::Unknown)
{
Window->KeyStates[(int) KeyEvent.Key] = KeyEvent.Pressed;
Window->TriggerEvent(KeyEvent);
}
}
}

Expand Down

0 comments on commit f4158f2

Please sign in to comment.