Redone fast file select (#1854)

* Redone fast file select

* Update soh/src/overlays/gamestates/ovl_title/z_title.c

* Prevent loading incompatible saves

* Dont change cvar on incompatible file
This commit is contained in:
Garrett Cox
2022-10-29 12:53:39 -05:00
committed by GitHub
parent cc7f831ec1
commit 4a686cf800
4 changed files with 51 additions and 103 deletions
+4 -5
View File
@@ -685,14 +685,13 @@ void SaveManager::LoadFile(int fileNum) {
}
bool SaveManager::SaveFile_Exist(int fileNum) {
try {
std::filesystem::exists(GetFileName(fileNum));
printf("File[%d] - exist \n",fileNum);
return true;
bool exists = std::filesystem::exists(GetFileName(fileNum));
SPDLOG_INFO("File[{}] - {}", fileNum, exists ? "exists" : "does not exist" );
return exists;
}
catch(std::filesystem::filesystem_error const& ex) {
printf("File[%d] - do not exist \n",fileNum);
SPDLOG_ERROR("Filesystem error");
return false;
}
}