mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 14:57:18 +07:00
Formatting / Removed mobile map screenshots due to crashes
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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(){
|
||||
|
@ -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){
|
||||
|
Reference in New Issue
Block a user