mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-06-11 13:19:51 -04:00
Fast Save Loader crashes fixes (#848)
This commit is contained in:
@@ -517,6 +517,19 @@ void SaveManager::LoadFile(int fileNum) {
|
||||
InitMeta(fileNum);
|
||||
}
|
||||
|
||||
bool SaveManager::SaveFile_Exist(int fileNum) {
|
||||
|
||||
try {
|
||||
std::filesystem::exists(GetFileName(fileNum));
|
||||
printf("File[%d] - exist \n",fileNum);
|
||||
return true;
|
||||
}
|
||||
catch(std::filesystem::filesystem_error const& ex) {
|
||||
printf("File[%d] - do not exist \n",fileNum);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void SaveManager::AddInitFunction(InitFunc func) {
|
||||
initFuncs.emplace_back(func);
|
||||
}
|
||||
@@ -1332,3 +1345,7 @@ extern "C" void Save_CopyFile(int from, int to) {
|
||||
extern "C" void Save_DeleteFile(int fileNum) {
|
||||
SaveManager::Instance->DeleteZeldaFile(fileNum);
|
||||
}
|
||||
|
||||
extern "C" bool Save_Exist(int fileNum) {
|
||||
return SaveManager::Instance->SaveFile_Exist(fileNum);
|
||||
}
|
||||
Reference in New Issue
Block a user