Fixes copying save files on the switch (#1478)
This commit is contained in:
parent
d53c8588e2
commit
e2e0a070ea
|
@ -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
|
// std::filesystem::copy_file doesn't work properly with the Wii U's toolchain atm
|
||||||
int copy_file(const char* src, const char* dst)
|
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) {
|
void SaveManager::CopyZeldaFile(int from, int to) {
|
||||||
assert(std::filesystem::exists(GetFileName(from)));
|
assert(std::filesystem::exists(GetFileName(from)));
|
||||||
DeleteZeldaFile(to);
|
DeleteZeldaFile(to);
|
||||||
#ifdef __WIIU__
|
#if defined(__WIIU__) || defined(__SWITCH__)
|
||||||
assert(copy_file(GetFileName(from).c_str(), GetFileName(to).c_str()) == 0);
|
copy_file(GetFileName(from).c_str(), GetFileName(to).c_str());
|
||||||
#else
|
#else
|
||||||
std::filesystem::copy_file(GetFileName(from), GetFileName(to));
|
std::filesystem::copy_file(GetFileName(from), GetFileName(to));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue