Skip to content

Commit

Permalink
Merge pull request #511 from keeganquinn/elcapitan-build-fix
Browse files Browse the repository at this point in the history
Cast values to fix build errors on OS X 10.11.
  • Loading branch information
AdrianKoshka authored Nov 25, 2019
2 parents 36ed253 + 3d832fd commit 13ac248
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/platform/OSXKeyState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,26 +337,26 @@ OSXKeyState::fakeMediaKey(KeyID id)
CGEventFlags
OSXKeyState::getModifierStateAsOSXFlags()
{
CGEventFlags modifiers = 0;
CGEventFlags modifiers = CGEventFlags(0);

if (m_shiftPressed) {
modifiers |= kCGEventFlagMaskShift;
modifiers |= CGEventFlags(kCGEventFlagMaskShift);
}

if (m_controlPressed) {
modifiers |= kCGEventFlagMaskControl;
modifiers |= CGEventFlags(kCGEventFlagMaskControl);
}

if (m_altPressed) {
modifiers |= kCGEventFlagMaskAlternate;
modifiers |= CGEventFlags(kCGEventFlagMaskAlternate);
}

if (m_superPressed) {
modifiers |= kCGEventFlagMaskCommand;
modifiers |= CGEventFlags(kCGEventFlagMaskCommand);
}

if (m_capsPressed) {
modifiers |= kCGEventFlagMaskAlphaShift;
modifiers |= CGEventFlags(kCGEventFlagMaskAlphaShift);
}

return modifiers;
Expand Down

0 comments on commit 13ac248

Please sign in to comment.