From ff88ed76f0445d47b1e34ec25410fd4f51dd6d2d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 19 Sep 2023 17:03:21 +0100 Subject: [PATCH] Hack to prevent timer event starvation on MSW. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673 --- eeschema/sim/simulator_frame_ui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eeschema/sim/simulator_frame_ui.cpp b/eeschema/sim/simulator_frame_ui.cpp index e030eb3539..2c0cdc1888 100644 --- a/eeschema/sim/simulator_frame_ui.cpp +++ b/eeschema/sim/simulator_frame_ui.cpp @@ -49,6 +49,7 @@ #include #include #include +#include "kiplatform/app.h" SIM_TRACE_TYPE operator|( SIM_TRACE_TYPE aFirst, SIM_TRACE_TYPE aSecond ) @@ -2552,6 +2553,11 @@ void SIMULATOR_FRAME_UI::OnSimUpdate() void SIMULATOR_FRAME_UI::OnSimReport( const wxString& aMsg ) { + // Required in win32 to ensure wxTimer events get scheduled in between other events + // Or else we may stall them out entirely and never get them during actions like rapid + // console updates. + KIPLATFORM::APP::ForceTimerMessagesToBeCreatedIfNecessary(); + m_simConsole->AppendText( aMsg + "\n" ); m_simConsole->SetInsertionPointEnd(); }