aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_win.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-30 19:37:54 +0000
committerDavid Robillard <d@drobilla.net>2012-04-30 19:37:54 +0000
commit91a4fea4672c54d84bd3e46422e32636351c8053 (patch)
tree0c5f73547b8cdf1ca4015b1bedaa9ba3cc6c225b /pugl/pugl_win.cpp
parent7bfed660202401ef16730495e688ba4502c9b8ad (diff)
downloadpugl-91a4fea4672c54d84bd3e46422e32636351c8053.tar.gz
pugl-91a4fea4672c54d84bd3e46422e32636351c8053.tar.bz2
pugl-91a4fea4672c54d84bd3e46422e32636351c8053.zip
Fix wonky modifiers on Windows.
Diffstat (limited to 'pugl/pugl_win.cpp')
-rw-r--r--pugl/pugl_win.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp
index a6b604f..6c4b07f 100644
--- a/pugl/pugl_win.cpp
+++ b/pugl/pugl_win.cpp
@@ -200,11 +200,11 @@ static void
setModifiers(PuglView* view)
{
view->mods = 0;
- view->mods |= GetKeyState(VK_SHIFT) ? PUGL_MOD_SHIFT : 0;
- view->mods |= GetKeyState(VK_CONTROL) ? PUGL_MOD_CTRL : 0;
- view->mods |= GetKeyState(VK_MENU) ? PUGL_MOD_ALT : 0;
- view->mods |= GetKeyState(VK_LWIN) ? PUGL_MOD_SUPER : 0;
- view->mods |= GetKeyState(VK_RWIN) ? PUGL_MOD_SUPER : 0;
+ view->mods |= (GetKeyState(VK_SHIFT) < 0) ? PUGL_MOD_SHIFT : 0;
+ view->mods |= (GetKeyState(VK_CONTROL) < 0) ? PUGL_MOD_CTRL : 0;
+ view->mods |= (GetKeyState(VK_MENU) < 0) ? PUGL_MOD_ALT : 0;
+ view->mods |= (GetKeyState(VK_LWIN) < 0) ? PUGL_MOD_SUPER : 0;
+ view->mods |= (GetKeyState(VK_RWIN) < 0) ? PUGL_MOD_SUPER : 0;
}
PuglStatus