Skip to content

Commit

Permalink
[Fix] Never report active modifier keys if OpenMPT is not the active …
Browse files Browse the repository at this point in the history
…application.

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@21763 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Sep 26, 2024
1 parent 0dc5a73 commit e5e9f53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mptrack/InputHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ FlagSet<Modifiers> CInputHandler::GetModifierMask()
{
BYTE keyStates[256];
FlagSet<Modifiers> modifierMask = ModNone;
if(GetActiveWindow() == nullptr)
return modifierMask;
if(!GetKeyboardState(keyStates))
return modifierMask;

Expand Down

0 comments on commit e5e9f53

Please sign in to comment.