Fixed crash with font loading too early in fullscreen on start
This commit is contained in:
@@ -6,6 +6,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.newdawn.slick.opengl.GLUtils;
|
||||
|
||||
import mightypork.gamecore.core.modules.AppAccess;
|
||||
import mightypork.gamecore.core.modules.AppModule;
|
||||
import mightypork.gamecore.gui.events.LayoutChangeEvent;
|
||||
@@ -83,6 +85,8 @@ public class ScreenRegistry extends AppModule implements ScreenRequestListener,
|
||||
toShow.setActive(true);
|
||||
|
||||
active = toShow;
|
||||
|
||||
fireLayoutUpdateEvent();
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +114,7 @@ public class ScreenRegistry extends AppModule implements ScreenRequestListener,
|
||||
@Override
|
||||
public void onViewportChanged(ViewportChangeEvent event)
|
||||
{
|
||||
fireLayoutUpdateEvent();
|
||||
if(active != null) fireLayoutUpdateEvent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -36,8 +36,12 @@ public abstract class BaseLazyResource implements LazyResource, Destroyable {
|
||||
@Override
|
||||
public synchronized final void load()
|
||||
{
|
||||
if (loadFailed) return;
|
||||
if (loadAttempted) return;
|
||||
if (!loadFailed && loadAttempted) return;
|
||||
|
||||
//
|
||||
// if (loadFailed) return;
|
||||
// if (loadAttempted) return;
|
||||
//
|
||||
|
||||
loadAttempted = true;
|
||||
loadFailed = false;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mightypork.gamecore.resources.fonts;
|
||||
|
||||
|
||||
import mightypork.gamecore.resources.TextureBasedResource;
|
||||
import mightypork.gamecore.util.math.color.Color;
|
||||
import mightypork.gamecore.util.math.constraints.vect.Vect;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mightypork.gamecore.logging.Log;
|
||||
import mightypork.gamecore.resources.TextureBasedResource;
|
||||
import mightypork.gamecore.resources.fonts.GLFont;
|
||||
import mightypork.gamecore.resources.textures.FilterMode;
|
||||
import mightypork.gamecore.resources.textures.LazyTexture;
|
||||
|
||||
@@ -139,7 +139,7 @@ public final class RogueApp extends BaseApp implements ViewportChangeListener, S
|
||||
getEventBus().send(new RogueStateRequest(RogueState.MAIN_MENU, true));
|
||||
}
|
||||
}
|
||||
}, true));
|
||||
}, false));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user