From 1cfa61b435115d9010c987e794a86e09ea7bf63e Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 26 Nov 2025 11:16:51 +0100 Subject: [PATCH] showbase: Temporarily add back throw_new_frame This helps with slight version mismatch compat, we can remove it before release --- direct/src/showbase/showBase.cxx | 8 ++++++++ direct/src/showbase/showBase.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/direct/src/showbase/showBase.cxx b/direct/src/showbase/showBase.cxx index e7ccadaf2d..43a8a16f8e 100644 --- a/direct/src/showbase/showBase.cxx +++ b/direct/src/showbase/showBase.cxx @@ -21,6 +21,7 @@ extern "C" { void CPSEnableForegroundOperation(ProcessSerialNumber* psn); } #include "showBase.h" +#include "throw_event.h" #include "graphicsWindow.h" #include "renderBuffer.h" #include "camera.h" @@ -44,6 +45,13 @@ ConfigureDef(config_showbase); ConfigureFn(config_showbase) { } +// Throw the "NewFrame" event in the C++ world. Some of the lerp code depends +// on receiving this. +void +throw_new_frame() { + throw_event("NewFrame"); +} + // Initialize the application for making a Gui-based app, such as wx. At the // moment, this is a no-op except on Mac. void diff --git a/direct/src/showbase/showBase.h b/direct/src/showbase/showBase.h index bfea13462a..25cf5fdf14 100644 --- a/direct/src/showbase/showBase.h +++ b/direct/src/showbase/showBase.h @@ -16,6 +16,7 @@ #include "directbase.h" +#include "eventHandler.h" #include "graphicsWindow.h" #include "graphicsPipe.h" #include "animControl.h" @@ -31,6 +32,8 @@ class GraphicsEngine; BEGIN_PUBLISH +EXPCL_DIRECT_SHOWBASE void throw_new_frame(); + EXPCL_DIRECT_SHOWBASE void init_app_for_gui(); // to handle windows stickykeys