Formatting / Removed mobile map screenshots due to crashes

This commit is contained in:
Anuken
2018-12-07 13:10:25 -05:00
parent b24770629e
commit 94665e8055
8 changed files with 96 additions and 102 deletions

View File

@@ -375,7 +375,7 @@ public class Control extends Module{
}
}
if(Inputs.keyTap("screenshot") && !ui.chatfrag.chatOpen()){
if(!mobile && Inputs.keyTap("screenshot") && !ui.chatfrag.chatOpen()){
renderer.takeMapScreenshot();
}

View File

@@ -165,26 +165,17 @@ public class Saves{
public void save(){
long time = totalPlaytime;
renderer.fog.writeFog();
long prev = totalPlaytime;
totalPlaytime = time;
threads.runGraphics(() -> {
//Renderer fog needs to be written on graphics thread, but save() can run on logic thread
//thus, runGraphics is required here
renderer.fog.writeFog();
SaveIO.saveToSlot(index);
meta = SaveIO.getData(index);
if(!state.is(State.menu)){
current = this;
}
//save on the logic thread
threads.run(() -> {
long prev = totalPlaytime;
totalPlaytime = time;
SaveIO.saveToSlot(index);
meta = SaveIO.getData(index);
if(!state.is(State.menu)){
current = this;
}
totalPlaytime = prev;
});
});
totalPlaytime = prev;
}
public boolean isHidden(){