Fix minimap "don't render" code not always working due to rounding errors

Significant performance boost in some areas like Gerudo Desert when map isn't visible.
This commit is contained in:
PJB3005
2026-04-07 22:37:57 +02:00
parent 8f77ca72b1
commit 2b45b01fcc
+2 -1
View File
@@ -596,7 +596,8 @@ void dMeterMap_c::_draw() {
#if TARGET_PC
// Optimization: don't draw map if it's off-screen/invisible.
// Especially useful in debug builds on Hyrule field etc., it's slow!
if ((!mMapIsInside && mSlidePositionOffset == getDispPosOutSide_OffsetX()) || mMapAlpha == 0) {
// That +3 is an arbitrary bias to avoid rounding issues causing this to fail.
if ((!mMapIsInside && mSlidePositionOffset <= getDispPosOutSide_OffsetX() + 3) || mMapAlpha == 0) {
return;
}
#endif