v1.1.2: removed waiting on pause and improved bundle saving efficiency
This will hopefully address save corruption errors for Pixel phones on Android 12
This commit is contained in:
parent
c4d0017ff7
commit
db74efea10
|
@ -23,6 +23,7 @@ package com.watabou.utils;
|
|||
|
||||
import com.badlogic.gdx.utils.JsonReader;
|
||||
import com.badlogic.gdx.utils.JsonValue;
|
||||
import com.badlogic.gdx.utils.JsonWriter;
|
||||
import com.watabou.noosa.Game;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
|
@ -452,7 +453,7 @@ public class Bundle {
|
|||
if (compressed) writer = new BufferedWriter( new OutputStreamWriter( new GZIPOutputStream(stream, GZIP_BUFFER ) ) );
|
||||
else writer = new BufferedWriter( new OutputStreamWriter( stream ) );
|
||||
|
||||
writer.write( bundle.toString() );
|
||||
bundle.data.prettyPrint(JsonWriter.OutputType.json, writer);
|
||||
writer.close();
|
||||
|
||||
return true;
|
||||
|
|
|
@ -627,7 +627,6 @@ public class GameScene extends PixelScene {
|
|||
@Override
|
||||
public synchronized void onPause() {
|
||||
try {
|
||||
if (Dungeon.hero != null && !Dungeon.hero.ready) waitForActorThread(500, false);
|
||||
Dungeon.saveAll();
|
||||
Badges.saveGlobal();
|
||||
Journal.saveGlobal();
|
||||
|
|
Loading…
Reference in New Issue
Block a user