diff options
| author | Christopher Leggett <chris@leggett.dev> | 2022-09-16 12:23:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-16 18:23:31 +0200 |
| commit | e2e0a070eab85ea6c7eeb32db67b08321bdfd929 (patch) | |
| tree | d0ecd4aa8ddee18e2249f392cbe1bd712ff792e2 | |
| parent | d53c8588e2f4e9b6c277694fb703db8ec5a2a275 (diff) | |
Fixes copying save files on the switch (#1478)
| -rw-r--r-- | soh/soh/SaveManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index d02584413..922103a10 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -1149,7 +1149,7 @@ void SaveManager::LoadStruct(const std::string& name, LoadStructFunc func) { } } -#ifdef __WIIU__ +#if defined(__WIIU__) || defined(__SWITCH__) // std::filesystem::copy_file doesn't work properly with the Wii U's toolchain atm int copy_file(const char* src, const char* dst) { @@ -1179,8 +1179,8 @@ int copy_file(const char* src, const char* dst) void SaveManager::CopyZeldaFile(int from, int to) { assert(std::filesystem::exists(GetFileName(from))); DeleteZeldaFile(to); -#ifdef __WIIU__ - assert(copy_file(GetFileName(from).c_str(), GetFileName(to).c_str()) == 0); +#if defined(__WIIU__) || defined(__SWITCH__) + copy_file(GetFileName(from).c_str(), GetFileName(to).c_str()); #else std::filesystem::copy_file(GetFileName(from), GetFileName(to)); #endif |
