diff options
author | David Robillard <d@drobilla.net> | 2023-05-03 10:28:41 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-05-03 10:38:23 -0400 |
commit | 4ded4f3b2ed4a28eba420c80d1be21f5b76f485c (patch) | |
tree | 6f07480c0dcff789370e93014e964ca051071908 /src/win.c | |
parent | 7a1d0239a6eecf99532d9a1ce8859eec876a142e (diff) | |
download | pugl-4ded4f3b2ed4a28eba420c80d1be21f5b76f485c.tar.gz pugl-4ded4f3b2ed4a28eba420c80d1be21f5b76f485c.tar.bz2 pugl-4ded4f3b2ed4a28eba420c80d1be21f5b76f485c.zip |
Fix mismatched types in ternary expressions
Diffstat (limited to 'src/win.c')
-rw-r--r-- | src/win.c | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -450,11 +450,11 @@ static uint32_t getModifiers(void) { // clang-format off - return (((GetKeyState(VK_SHIFT) < 0) ? PUGL_MOD_SHIFT : 0U) | - ((GetKeyState(VK_CONTROL) < 0) ? PUGL_MOD_CTRL : 0U) | - ((GetKeyState(VK_MENU) < 0) ? PUGL_MOD_ALT : 0U) | - ((GetKeyState(VK_LWIN) < 0) ? PUGL_MOD_SUPER : 0U) | - ((GetKeyState(VK_RWIN) < 0) ? PUGL_MOD_SUPER : 0U)); + return (((GetKeyState(VK_SHIFT) < 0) ? (uint32_t)PUGL_MOD_SHIFT : 0U) | + ((GetKeyState(VK_CONTROL) < 0) ? (uint32_t)PUGL_MOD_CTRL : 0U) | + ((GetKeyState(VK_MENU) < 0) ? (uint32_t)PUGL_MOD_ALT : 0U) | + ((GetKeyState(VK_LWIN) < 0) ? (uint32_t)PUGL_MOD_SUPER : 0U) | + ((GetKeyState(VK_RWIN) < 0) ? (uint32_t)PUGL_MOD_SUPER : 0U)); // clang-format on } @@ -614,12 +614,13 @@ handleConfigure(PuglView* view, PuglEvent* event) event->configure.height = (PuglSpan)height; event->configure.style = - ((view->impl->mapped ? PUGL_VIEW_STYLE_MAPPED : 0U) | - (view->resizing ? PUGL_VIEW_STYLE_RESIZING : 0U) | - (view->impl->fullscreen ? PUGL_VIEW_STYLE_FULLSCREEN : 0U) | - (view->impl->minimized ? PUGL_VIEW_STYLE_HIDDEN : 0U) | - (view->impl->maximized ? (PUGL_VIEW_STYLE_TALL | PUGL_VIEW_STYLE_WIDE) - : 0U)); + ((view->impl->mapped ? (unsigned)PUGL_VIEW_STYLE_MAPPED : 0U) | + (view->resizing ? (unsigned)PUGL_VIEW_STYLE_RESIZING : 0U) | + (view->impl->fullscreen ? (unsigned)PUGL_VIEW_STYLE_FULLSCREEN : 0U) | + (view->impl->minimized ? (unsigned)PUGL_VIEW_STYLE_HIDDEN : 0U) | + (view->impl->maximized + ? (unsigned)(PUGL_VIEW_STYLE_TALL | PUGL_VIEW_STYLE_WIDE) + : 0U)); return rect; } |