Fixed NaN black screen

This commit is contained in:
Anuken
2026-06-20 16:21:00 -04:00
parent e4d4b51962
commit e4ceff01d4
2 changed files with 3 additions and 1 deletions

View File

@@ -233,6 +233,9 @@ public class MapView extends Element implements GestureListener{
@Override
public void draw(){
//can cause NaN
if(editor.width() == 0 || editor.height() == 0) return;
float ratio = 1f / ((float)editor.width() / editor.height());
float size = Math.min(width, height);
float sclwidth = size * zoom;

View File

@@ -144,7 +144,6 @@ public class DataImagePacker{
packer.forceDispose();
//getRegions is intentionally not modified, it's a hassle to manage, O(n) to unapply, and not used anywhere important. there's no point.
//the drawable map isn't used, and thus not modified either