summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/GameController.cpp3
-rw-r--r--src/save/ServerSaveActivity.cpp11
2 files changed, 10 insertions, 4 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index a1c4965..8ba215e 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -1101,8 +1101,7 @@ void GameController::SaveAsCurrent()
virtual ~SaveUploadedCallback() {};
virtual void SaveUploaded(SaveInfo save)
{
- //Don't do anything
- //c->LoadSave(&save);
+ c->LoadSave(&save);
}
};
diff --git a/src/save/ServerSaveActivity.cpp b/src/save/ServerSaveActivity.cpp
index f5caf77..d336ea1 100644
--- a/src/save/ServerSaveActivity.cpp
+++ b/src/save/ServerSaveActivity.cpp
@@ -33,7 +33,6 @@ public:
}
};
-//Currently, reading is done on another thread, we can't render outside the main thread due to some bullshit with OpenGL
class SaveUploadTask: public Task
{
SaveInfo save;
@@ -151,11 +150,19 @@ ServerSaveActivity::ServerSaveActivity(SaveInfo save, bool saveNow, ServerSaveAc
void ServerSaveActivity::NotifyDone(Task * task)
{
- Exit();
if(!task->GetSuccess())
{
+ Exit();
new ErrorMessage("Error", Client::Ref().GetLastError());
}
+ else
+ {
+ if(callback)
+ {
+ callback->SaveUploaded(save);
+ }
+ Exit();
+ }
}
void ServerSaveActivity::Save()