mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-11 00:07:46 +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();
|
renderer.takeMapScreenshot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,14 +165,7 @@ public class Saves{
|
|||||||
|
|
||||||
public void save(){
|
public void save(){
|
||||||
long time = totalPlaytime;
|
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();
|
renderer.fog.writeFog();
|
||||||
|
|
||||||
//save on the logic thread
|
|
||||||
threads.run(() -> {
|
|
||||||
long prev = totalPlaytime;
|
long prev = totalPlaytime;
|
||||||
totalPlaytime = time;
|
totalPlaytime = time;
|
||||||
|
|
||||||
@ -183,8 +176,6 @@ public class Saves{
|
|||||||
}
|
}
|
||||||
|
|
||||||
totalPlaytime = prev;
|
totalPlaytime = prev;
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isHidden(){
|
public boolean isHidden(){
|
||||||
|
@ -139,7 +139,8 @@ public class KryoServer implements ServerProvider {
|
|||||||
try{
|
try{
|
||||||
if(!UPnP.isMappedTCP(port)) UPnP.openPortTCP(port);
|
if(!UPnP.isMappedTCP(port)) UPnP.openPortTCP(port);
|
||||||
if(!UPnP.isMappedUDP(port)) UPnP.openPortUDP(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){
|
private void handleException(Throwable e){
|
||||||
Timers.run(0f, () -> { throw new RuntimeException(e);});
|
Timers.run(0f, () -> {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
KryoConnection getByKryoID(int id){
|
KryoConnection getByKryoID(int id){
|
||||||
|
Reference in New Issue
Block a user