mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-03-26 16:51:04 -07:00
Minor save-time fix
This commit is contained in:
parent
ba62e0eefc
commit
aa00a1b8d1
1 changed files with 10 additions and 1 deletions
|
|
@ -162,6 +162,8 @@ 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
|
||||
|
|
@ -169,9 +171,16 @@ public class Saves{
|
|||
|
||||
//save on the logic thread
|
||||
threads.run(() -> {
|
||||
long prev = totalPlaytime;
|
||||
totalPlaytime = time;
|
||||
|
||||
SaveIO.saveToSlot(index);
|
||||
meta = SaveIO.getData(index);
|
||||
current = this;
|
||||
if(!state.is(State.menu)){
|
||||
current = this;
|
||||
}
|
||||
|
||||
totalPlaytime = prev;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue