Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
fix modifier key bit mask check
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Dilly committed Apr 15, 2015
1 parent 5d3987c commit f26dfe9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/unecht/glfw/application.d
Expand Up @@ -168,10 +168,10 @@ package:
else if(action == GLFW_REPEAT)
ev.keyEvent.action = UEEvent.KeyEvent.Action.Repeat;

ev.keyEvent.shiftDown = testBit(mods,GLFW_MOD_SHIFT);
ev.keyEvent.ctrlDown = testBit(mods,GLFW_MOD_CONTROL);
ev.keyEvent.altDown = testBit(mods,GLFW_MOD_ALT);
ev.keyEvent.superDown = testBit(mods,GLFW_MOD_SUPER);
ev.keyEvent.shiftDown = testBitMask(mods,GLFW_MOD_SHIFT);
ev.keyEvent.ctrlDown = testBitMask(mods,GLFW_MOD_CONTROL);
ev.keyEvent.altDown = testBitMask(mods,GLFW_MOD_ALT);
ev.keyEvent.superDown = testBitMask(mods,GLFW_MOD_SUPER);

version(UEProfiling)
{
Expand Down Expand Up @@ -204,9 +204,9 @@ package:
ev.mouseButtonEvent.button = button;
ev.mouseButtonEvent.action = (action == GLFW_PRESS) ? UEEvent.MouseButtonEvent.Action.down : UEEvent.MouseButtonEvent.Action.up;

ev.mouseButtonEvent.modShift = testBit(mods,GLFW_MOD_SHIFT);
ev.mouseButtonEvent.modCtrl = testBit(mods,GLFW_MOD_CONTROL);
ev.mouseButtonEvent.modAlt = testBit(mods,GLFW_MOD_ALT);
ev.mouseButtonEvent.modShift = testBitMask(mods,GLFW_MOD_SHIFT);
ev.mouseButtonEvent.modCtrl = testBitMask(mods,GLFW_MOD_CONTROL);
ev.mouseButtonEvent.modAlt = testBitMask(mods,GLFW_MOD_ALT);

events.trigger(ev);
}
Expand Down

0 comments on commit f26dfe9

Please sign in to comment.