Fix map glitch crash w/ interpolation

Fixes #2513
This commit is contained in:
Luke Street
2026-09-19 15:53:38 -06:00
parent ec4d628720
commit 14d5eccc04
3 changed files with 17 additions and 0 deletions
+4
View File
@@ -35,6 +35,10 @@ void dMw_offPauseWindow();
void dMw_onMenuRing();
void dMw_offMenuRing();
#if TARGET_PC
bool dMw_isCapturePending();
#endif
class dDlst_MENU_CAPTURE_c;
class dMw_c : public msg_class {
+8
View File
@@ -215,6 +215,14 @@ void dMw_offMenuRing() {
}
}
#if TARGET_PC
bool dMw_isCapturePending() {
dMw_c* menuWindow = dMeter2Info_getMenuWindowClass();
return menuWindow != NULL && menuWindow->mpCapture != NULL &&
menuWindow->mpCapture->getDrawFlag() == 1;
}
#endif
static BOOL dMw_isMenuRing() {
dMw_c* menu_window = dMeter2Info_getMenuWindowClass();
if (menu_window != NULL) {
+5
View File
@@ -23,6 +23,7 @@
#include "d/d_s_menu.h"
#include "d/d_s_play.h"
#include "d/d_debug_pad.h"
#include "d/d_menu_window.h"
#include "f_ap/f_ap_game.h"
#include "f_op/f_op_msg.h"
#include "m_Do/m_Do_MemCard.h"
@@ -286,6 +287,10 @@ void main01(void) {
if (timing.numSimTicks > 0) {
dusk::interp::begin_frame(0.0f);
for (int i = 0; i < timing.numSimTicks; ++i) {
// When a capture is pending, it has to be painted before the next sim tick.
if (dMw_isCapturePending()) {
break;
}
if (timing.interpolating) {
dusk::interp::begin_sim_tick();
}