mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-01 20:12:50 +02:00
Ensure save is stored in memory for reload when using Save as current name, correct ServerSaveActivity to call SaveUploaded when doing an instant upload
This commit is contained in:
@@ -1101,8 +1101,7 @@ void GameController::SaveAsCurrent()
|
||||
virtual ~SaveUploadedCallback() {};
|
||||
virtual void SaveUploaded(SaveInfo save)
|
||||
{
|
||||
//Don't do anything
|
||||
//c->LoadSave(&save);
|
||||
c->LoadSave(&save);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user