diff --git a/core/src/main/assets/messages/scenes/scenes.properties b/core/src/main/assets/messages/scenes/scenes.properties index 006fc63a4..c2ba3399b 100644 --- a/core/src/main/assets/messages/scenes/scenes.properties +++ b/core/src/main/assets/messages/scenes/scenes.properties @@ -135,4 +135,4 @@ scenes.welcomescene.lang_warning_title=Incomplete Translation scenes.welcomescene.lang_warning_msg=Some of the new content from this update has not yet been translated.\n\nSome phrases may be written in English.\n\nThe translation teams are working to resolve this and a full translation should be patched in soon.\n\nThank you for your patience. scenes.welcomescene.continue=Continue scenes.welcomescene.changelist=Changelist -scenes.welcomescene.save_warning=Shattered Pixel Dungeon was interrupted while trying to save your game data recently.\n\nShattered has built-in protections against this, so your game data is probably fine. You may want to check to be sure.\n\nThis usually happens when your device suddenly loses power, or if it terminates Shattered without letting it close properly. Battery saver features can often cause this on mobile devices. \ No newline at end of file +scenes.welcomescene.save_warning=Shattered Pixel Dungeon was interrupted while trying to save your game data recently. Shattered has built-in protections against this, so your game data should be fine.\n\nThis usually happens when your device suddenly loses power, or if it terminates Shattered without letting it close properly. Battery saver features can often cause this on mobile devices. Restarting your device may also help if you are seeing this error frequently. \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index 472c07210..06309bb8c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -55,13 +55,16 @@ public class WelcomeScene extends PixelScene { private static final int LATEST_UPDATE = ShatteredPixelDungeon.v1_3_2; + //used so that the game does not keep showing the window forever if cleaning fails + private static boolean triedCleaningTemp = false; + @Override public void create() { super.create(); final int previousVersion = SPDSettings.version(); - if (FileUtils.cleanTempFiles()){ + if (!triedCleaningTemp && FileUtils.cleanTempFiles()){ add(new WndHardNotification(Icons.get(Icons.WARNING), Messages.get(WndError.class, "title"), Messages.get(this, "save_warning"), @@ -70,6 +73,7 @@ public class WelcomeScene extends PixelScene { @Override public void hide() { super.hide(); + triedCleaningTemp = true; ShatteredPixelDungeon.resetScene(); } }); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHardNotification.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHardNotification.java index 7770bc1ec..03091096e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHardNotification.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHardNotification.java @@ -72,6 +72,7 @@ public class WndHardNotification extends WndTitledMessage{ timeLeft -= incTime; incTime = 0; btnOkay.text(btnMessage + " (" + (int)Math.ceil(timeLeft) + ")"); + btnOkay.enable(false); } }