mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 12:52:18 -05:00
Savestate crash fix on Ubuntu (#843)
This commit is contained in:
parent
dfa929a16f
commit
e41873fff4
@ -869,21 +869,19 @@ SaveStateReturn SaveStateMgr::AddRequest(const SaveStateRequest request) {
|
||||
switch (request.type) {
|
||||
case RequestType::SAVE:
|
||||
requests.push(request);
|
||||
break;
|
||||
return SaveStateReturn::SUCCESS;
|
||||
case RequestType::LOAD:
|
||||
if (states.contains(request.slot)) {
|
||||
requests.push(request);
|
||||
return SaveStateReturn::SUCCESS;
|
||||
} else {
|
||||
SPDLOG_ERROR("Invalid SaveState slot: {}", request.type);
|
||||
SohImGui::overlay->TextDrawNotification(1.0f, true, "state slot %u empty", request.slot);
|
||||
return SaveStateReturn::FAIL_INVALID_SLOT;
|
||||
}
|
||||
break;
|
||||
[[unlikely]] default:
|
||||
SPDLOG_ERROR("Invalid SaveState request type: {}", request.type);
|
||||
return SaveStateReturn::FAIL_BAD_REQUEST;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user