Minor save-time fix
This commit is contained in:
@@ -162,6 +162,8 @@ public class Saves{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void save(){
|
public void save(){
|
||||||
|
long time = totalPlaytime;
|
||||||
|
|
||||||
threads.runGraphics(() -> {
|
threads.runGraphics(() -> {
|
||||||
//Renderer fog needs to be written on graphics thread, but save() can run on logic thread
|
//Renderer fog needs to be written on graphics thread, but save() can run on logic thread
|
||||||
//thus, runGraphics is required here
|
//thus, runGraphics is required here
|
||||||
@@ -169,9 +171,16 @@ public class Saves{
|
|||||||
|
|
||||||
//save on the logic thread
|
//save on the logic thread
|
||||||
threads.run(() -> {
|
threads.run(() -> {
|
||||||
|
long prev = totalPlaytime;
|
||||||
|
totalPlaytime = time;
|
||||||
|
|
||||||
SaveIO.saveToSlot(index);
|
SaveIO.saveToSlot(index);
|
||||||
meta = SaveIO.getData(index);
|
meta = SaveIO.getData(index);
|
||||||
|
if(!state.is(State.menu)){
|
||||||
current = this;
|
current = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
totalPlaytime = prev;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user