From: bones_was_here Date: Mon, 25 Sep 2023 06:08:42 +0000 (+1000) Subject: cbuf: fix a 1 frame delay of keybind inputs X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ce3aa4edca37ac153738126cf7bff84a615e5bc2;p=xonotic%2Fdarkplaces.git 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 --- 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);