From 97d862a2d08c6accab2146a26d211a8f0e305427 Mon Sep 17 00:00:00 2001 From: gambas Date: Tue, 12 Apr 2022 19:58:15 +0200 Subject: [PATCH] Allow calling 'WAIT' alone during a keyboard event handler. [GB.QT4] * BUG: Allow calling 'WAIT' alone during a keyboard event handler. [GB.QT5] * BUG: Allow calling 'WAIT' alone during a keyboard event handler. --- gb.qt4/src/main.cpp | 2 +- gb.qt5/src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gb.qt4/src/main.cpp b/gb.qt4/src/main.cpp index 0e74269a2..acceaf2b2 100644 --- a/gb.qt4/src/main.cpp +++ b/gb.qt4/src/main.cpp @@ -1044,7 +1044,7 @@ static void hook_wait(int duration) return; } - if (CKEY_is_valid()) + if (CKEY_is_valid() && duration != -1) { if (!_warning) { diff --git a/gb.qt5/src/main.cpp b/gb.qt5/src/main.cpp index 1c093c8d1..80272ab9c 100644 --- a/gb.qt5/src/main.cpp +++ b/gb.qt5/src/main.cpp @@ -808,7 +808,7 @@ static void hook_wait(int duration) return; } - if (CKEY_is_valid()) + if (CKEY_is_valid() && duration != -1) { if (!_warning) {