From ce3aa4edca37ac153738126cf7bff84a615e5bc2 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Mon, 25 Sep 2023 16:08:42 +1000 Subject: [PATCH] cbuf: fix a 1 frame delay of keybind inputs This was a regression (from div0-stable) introduced in the refactoring. Signed-off-by: bones_was_here --- cl_main.c | 5 ----- host.c | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cl_main.c b/cl_main.c index fe1840af..9418ee06 100644 --- a/cl_main.c +++ b/cl_main.c @@ -2813,11 +2813,6 @@ double CL_Frame (double time) CL_VM_PreventInformationLeaks(); - // get new key events - Key_EventQueue_Unblock(); - SndSys_SendKeyEvents(); - Sys_SendKeyEvents(); - /* * If the accumulator hasn't become positive, don't * run the frame. Everything that happens before this diff --git a/host.c b/host.c index 09571024..a20903a9 100644 --- a/host.c +++ b/host.c @@ -643,6 +643,9 @@ static double Host_Frame(double time) // Run any downloads Curl_Frame(); + // get new SDL events and add commands from keybindings to the cbuf + Sys_SendKeyEvents(); + // process console commands Cbuf_Frame(host.cbuf); -- 2.39.2