v1.4.0: improved save corruption error message
This commit is contained in:
@@ -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.
|
||||
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.
|
||||
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -72,6 +72,7 @@ public class WndHardNotification extends WndTitledMessage{
|
||||
timeLeft -= incTime;
|
||||
incTime = 0;
|
||||
btnOkay.text(btnMessage + " (" + (int)Math.ceil(timeLeft) + ")");
|
||||
btnOkay.enable(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user