aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaoyuki Sawa <sawa_naoyuki-1@yahoo.co.jp>2016-11-15 19:49:24 +0900
committerNaoyuki Sawa <sawa_naoyuki-1@yahoo.co.jp>2016-11-15 19:49:24 +0900
commit2849cdf8cd52e92cefea9ad0a8f56bf21a5fe2f0 (patch)
treea86ea88e7fa2caedee60361065cddc4b3aa31f02
parent8e603282a4531bf9826698a7687f1e18b1364b94 (diff)
downloadsherlock.lv2-2849cdf8cd52e92cefea9ad0a8f56bf21a5fe2f0.tar.xz
fix: In the windows demos, the key reaction is occured at the timing of the control keys are released.
-rw-r--r--demo/d3d11/nuklear_d3d11.h2
-rw-r--r--demo/gdi/nuklear_gdi.h2
-rw-r--r--demo/gdip/nuklear_gdip.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/demo/d3d11/nuklear_d3d11.h b/demo/d3d11/nuklear_d3d11.h
index 68b067f..717686c 100644
--- a/demo/d3d11/nuklear_d3d11.h
+++ b/demo/d3d11/nuklear_d3d11.h
@@ -205,7 +205,7 @@ nk_d3d11_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
{
- int down = (lparam >> 31) & 1;
+ int down = (lparam >> 31) & 1 ? 0 : 1;
int ctrl = GetKeyState(VK_CONTROL) & (1 << 15);
switch (wparam)
diff --git a/demo/gdi/nuklear_gdi.h b/demo/gdi/nuklear_gdi.h
index e2792e4..9fb919f 100644
--- a/demo/gdi/nuklear_gdi.h
+++ b/demo/gdi/nuklear_gdi.h
@@ -516,7 +516,7 @@ nk_gdi_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
{
- int down = (lparam >> 31) & 1;
+ int down = (lparam >> 31) & 1 ? 0 : 1;
int ctrl = GetKeyState(VK_CONTROL) & (1 << 15);
switch (wparam)
diff --git a/demo/gdip/nuklear_gdip.h b/demo/gdip/nuklear_gdip.h
index 592887a..8a47511 100644
--- a/demo/gdip/nuklear_gdip.h
+++ b/demo/gdip/nuklear_gdip.h
@@ -754,7 +754,7 @@ nk_gdip_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
{
- int down = (lparam >> 31) & 1;
+ int down = (lparam >> 31) & 1 ? 0 : 1;
int ctrl = GetKeyState(VK_CONTROL) & (1 << 15);
switch (wparam)