diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-24 16:34:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-24 22:34:02 +0300 |
commit | b1f3a86d999b6742d783de5a11d7de0c54cf5891 (patch) | |
tree | 4e423b7fb0be4ea1aa62430f514c6db82f9c725e /source/blender/windowmanager/intern | |
parent | 6d58339973b6a3b5ccf972e67a07a4aac4904ced (diff) |
Cleanup: use macro to set flags
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index 87737229d83..17408dcd61d 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -215,30 +215,24 @@ static void playanim_event_qual_update(void) /* Shift */ GHOST_GetModifierKeyState(g_WS.ghost_system, GHOST_kModifierKeyLeftShift, &val); - if (val) g_WS.qual |= WS_QUAL_LSHIFT; - else g_WS.qual &= ~WS_QUAL_LSHIFT; + SET_FLAG_FROM_TEST(g_WS.qual, val, WS_QUAL_LSHIFT); GHOST_GetModifierKeyState(g_WS.ghost_system, GHOST_kModifierKeyRightShift, &val); - if (val) g_WS.qual |= WS_QUAL_RSHIFT; - else g_WS.qual &= ~WS_QUAL_RSHIFT; + SET_FLAG_FROM_TEST(g_WS.qual, val, WS_QUAL_RSHIFT); /* Control */ GHOST_GetModifierKeyState(g_WS.ghost_system, GHOST_kModifierKeyLeftControl, &val); - if (val) g_WS.qual |= WS_QUAL_LCTRL; - else g_WS.qual &= ~WS_QUAL_LCTRL; + SET_FLAG_FROM_TEST(g_WS.qual, val, WS_QUAL_LCTRL); GHOST_GetModifierKeyState(g_WS.ghost_system, GHOST_kModifierKeyRightControl, &val); - if (val) g_WS.qual |= WS_QUAL_RCTRL; - else g_WS.qual &= ~WS_QUAL_RCTRL; + SET_FLAG_FROM_TEST(g_WS.qual, val, WS_QUAL_RCTRL); /* Alt */ GHOST_GetModifierKeyState(g_WS.ghost_system, GHOST_kModifierKeyLeftAlt, &val); - if (val) g_WS.qual |= WS_QUAL_LALT; - else g_WS.qual &= ~WS_QUAL_LALT; + SET_FLAG_FROM_TEST(g_WS.qual, val, WS_QUAL_LALT); GHOST_GetModifierKeyState(g_WS.ghost_system, GHOST_kModifierKeyRightAlt, &val); - if (val) g_WS.qual |= WS_QUAL_RALT; - else g_WS.qual &= ~WS_QUAL_RALT; + SET_FLAG_FROM_TEST(g_WS.qual, val, WS_QUAL_RALT); } typedef struct PlayAnimPict { |