LUS Cleanup: Merge Window and GlobalCtx2 classes. (#1259)

* Merges GlobalCtx2 and Window classes.

* Includes condition variable in File.

* add mac specific include

* sstream to get past "implicit instantiation of undefined template" error

* switch/wiiu includes

* that file doesn't exist

* more wii u globalctx2 stuff

Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
Kenix3
2022-08-21 21:08:01 -04:00
committed by GitHub
parent ad8179287e
commit 51e4485966
35 changed files with 349 additions and 419 deletions
+4 -4
View File
@@ -16,7 +16,7 @@
extern "C" SaveContext gSaveContext;
std::filesystem::path SaveManager::GetFileName(int fileNum) {
const std::filesystem::path sSavePath(Ship::GlobalCtx2::GetPathRelativeToAppDirectory("Save"));
const std::filesystem::path sSavePath(Ship::Window::GetPathRelativeToAppDirectory("Save"));
return sSavePath / ("file" + std::to_string(fileNum + 1) + ".sav");
}
@@ -133,10 +133,10 @@ void SaveManager::SaveRandomizer() {
}
void SaveManager::Init() {
const std::filesystem::path sSavePath(Ship::GlobalCtx2::GetPathRelativeToAppDirectory("Save"));
const std::filesystem::path sSavePath(Ship::Window::GetPathRelativeToAppDirectory("Save"));
const std::filesystem::path sGlobalPath = sSavePath / std::string("global.sav");
auto sOldSavePath = Ship::GlobalCtx2::GetPathRelativeToAppDirectory("oot_save.sav");
auto sOldBackupSavePath = Ship::GlobalCtx2::GetPathRelativeToAppDirectory("oot_save.bak");
auto sOldSavePath = Ship::Window::GetPathRelativeToAppDirectory("oot_save.sav");
auto sOldBackupSavePath = Ship::Window::GetPathRelativeToAppDirectory("oot_save.bak");
// If the save directory does not exist, create it
if (!std::filesystem::exists(sSavePath)) {