From 4dc20d8fece5a82cfb41d84fd99821976fa45abb Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Mon, 5 Sep 2016 09:41:22 -0400 Subject: [PATCH] small optimization of when to execute frames --- win32_4ed.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win32_4ed.cpp b/win32_4ed.cpp index 018c026e..7061a645 100644 --- a/win32_4ed.cpp +++ b/win32_4ed.cpp @@ -1595,7 +1595,6 @@ Win32Callback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ case WM_KEYDOWN: case WM_KEYUP: { - win32vars.got_useful_event = 1; switch (wParam){ case VK_CONTROL:case VK_LCONTROL:case VK_RCONTROL: case VK_MENU:case VK_LMENU:case VK_RMENU: @@ -1650,6 +1649,8 @@ Win32Callback(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ b8 previous_state = ((lParam & Bit_30)?(1):(0)); b8 current_state = ((lParam & Bit_31)?(0):(1)); + win32vars.got_useful_event = 1; + if (current_state){ u8 key = keycode_lookup_table[(u8)wParam];