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,14 +165,7 @@ public class Saves{
public void save(){
long time = totalPlaytime;
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();
//save on the logic thread
threads.run(() -> {
long prev = totalPlaytime;
totalPlaytime = time;
@ -183,8 +176,6 @@ public class Saves{
}
totalPlaytime = prev;
});
});
}
public boolean isHidden(){

View File

@ -139,7 +139,8 @@ public class KryoServer implements ServerProvider {
try{
if(!UPnP.isMappedTCP(port)) UPnP.openPortTCP(port);
if(!UPnP.isMappedUDP(port)) UPnP.openPortUDP(port);
}catch(Throwable ignored){}
}catch(Throwable ignored){
}
});
}
@ -251,7 +252,9 @@ public class KryoServer implements ServerProvider {
}
private void handleException(Throwable e){
Timers.run(0f, () -> { throw new RuntimeException(e);});
Timers.run(0f, () -> {
throw new RuntimeException(e);
});
}
KryoConnection getByKryoID(int id){