fix d_meter_button flashing (#549)

This commit is contained in:
Howard Luck
2026-04-25 15:48:45 -06:00
committed by GitHub
parent 977ad16806
commit 0e5ea0d3b1
2 changed files with 20 additions and 1 deletions
+5
View File
@@ -343,6 +343,11 @@ public:
/* 0x624 */ f32 mMidonaPosX;
/* 0x628 */ f32 mMidonaPosY;
/* 0x62C */ f32 mMidonaScale;
#ifdef TARGET_PC
bool mWasListen[2];
bool mWasRepeat[2];
#endif
};
#endif /* D_METER_D_METER_BUTTON_H */
+15 -1
View File
@@ -368,8 +368,22 @@ void dMeterButton_c::draw() {
}
if (var_r3) {
#ifdef TARGET_PC
if (dusk::frame_interp::get_ui_tick_pending()) {
mWasListen[i] = var_r22;
mWasRepeat[i] = var_r23;
} else {
var_r22 = mWasListen[i];
var_r23 = mWasRepeat[i];
}
#endif
if (var_r22) {
if (field_0x2e8[i] == 18.0f) {
#ifdef TARGET_PC
if (field_0x2e8[i] == 18.0f && dusk::frame_interp::get_ui_tick_pending())
#else
if (field_0x2e8[i] == 18.0f)
#endif
{
mDoAud_seStart(Z2SE_SY_HINT_BUTTON_BLINK, NULL, 0, 0);
}