mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-04 18:28:45 -04:00
Don't render HUD map if invisible
Very nice on debug builds since you can avoid huge FPS drops by hiding the map now.
This commit is contained in:
@@ -593,6 +593,14 @@ void dMeterMap_c::_draw() {
|
||||
dComIfGd_set2DOpa(this);
|
||||
}
|
||||
#else
|
||||
#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) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
mMap->_draw();
|
||||
dComIfGd_set2DOpa(this);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user