I hate Windows even more today

This commit is contained in:
offtkp 2024-09-25 18:49:20 +03:00
parent 62a3f1cbed
commit 265698d6bf

View file

@ -450,7 +450,18 @@ void save(const std::filesystem::path& path) {
fmt::print("Filesystem error: {}\n", error.message());
}
fmt::print("Saving new configuration file {}\n", fmt::UTF(path.u8string()));
try {
#ifdef _WIN32
fmt::print(L"Saving new configuration file {}\n", path.wstring());
#else
fmt::print("Saving new configuration file {}\n", fmt::UTF(path.u8string()));
#endif
} catch (...) {
// Path to string conversion particularily on Windows is quite the mess. Just to make
// sure the emulator doesn't somehow crash due to a bad string conversion
// we catch the exception and print a generic message.
fmt::print("Saving new configuration file\n");
}
}
data["General"]["isPS4Pro"] = isNeo;