mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
- Catch exceptions when disposing ImageCache textures, otherwise certain modes crash (e.g. Quest Draft Tournaments)
This commit is contained in:
@@ -405,7 +405,14 @@ public class Forge implements ApplicationListener {
|
|||||||
try {
|
try {
|
||||||
endKeyInput(); //end key input before switching screens
|
endKeyInput(); //end key input before switching screens
|
||||||
ForgeAnimation.endAll(); //end all active animations before switching screens
|
ForgeAnimation.endAll(); //end all active animations before switching screens
|
||||||
ImageCache.disposeTexture();
|
try {
|
||||||
|
ImageCache.disposeTexture();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// FIXME: This isn't supposed to be necessary, but disposeTexture crashes e.g. in Quest Tournaments on mobile, needs proper fixing.
|
||||||
|
System.err.println("Warning: caught an exception while trying to call ImageCache.disposeTexture() in setCurrentScreen.");
|
||||||
|
}
|
||||||
|
|
||||||
currentScreen = screen0;
|
currentScreen = screen0;
|
||||||
currentScreen.setSize(screenWidth, screenHeight);
|
currentScreen.setSize(screenWidth, screenHeight);
|
||||||
|
|||||||
Reference in New Issue
Block a user