From 8559aebaedbd9e5a1272d0099b7dd3411f02ec7e Mon Sep 17 00:00:00 2001 From: vurtun Date: Thu, 20 Apr 2017 18:14:24 +0200 Subject: [PATCH] Fixed key repeat #416 in `nk_input_key` --- CHANGELOG.md | 1 + nuklear.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1022ff4..ae1f7143 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Changes: -------- +- 2017/04/20 (1.37.1) - Fixed key repeat found inside glfw demo backends - 2017/04/20 (1.37.0) - Extended properties with selection and clipbard support - 2017/04/20 (1.36.2) - Fixed #405 overlapping rows with zero padding and spacing - 2017/04/09 (1.36.1) - Fixed #403 with another widget float error diff --git a/nuklear.h b/nuklear.h index 323fffa3..57a4cf21 100644 --- a/nuklear.h +++ b/nuklear.h @@ -12176,8 +12176,9 @@ nk_input_key(struct nk_context *ctx, enum nk_keys key, int down) NK_ASSERT(ctx); if (!ctx) return; in = &ctx->input; + if (in->keyboard.keys[key].down != down) + in->keyboard.keys[key].clicked++; in->keyboard.keys[key].down = down; - in->keyboard.keys[key].clicked++; } NK_API void