mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 00:13:08 +00:00
My hatred for Windows grows with every passing day
This commit is contained in:
parent
662ae57435
commit
9a4f57e4e6
@ -445,18 +445,19 @@ void save(const std::filesystem::path& path) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef _WIN32
|
|
||||||
#define PREFIX(str) L##str
|
|
||||||
#else
|
|
||||||
#define PREFIX(str) str
|
|
||||||
#endif
|
|
||||||
if (error) {
|
if (error) {
|
||||||
fmt::print(PREFIX("Filesystem error accessing {}"), path.native());
|
fmt::print("Filesystem error: {}\n", error.message());
|
||||||
// can't mix wstring and string in fmt
|
}
|
||||||
fmt::print(" (error: {})\n", error.message());
|
|
||||||
|
try {
|
||||||
|
// Printing wstring (which a path is natively on Windows) to console is generally shaky.
|
||||||
|
// There's an open issue on fmtlib (#3491) where doing so can cause a crash, and it has
|
||||||
|
// happened to us too. We're going to assume the path can be converted to a string and
|
||||||
|
// printed safely, not printing the path if it can't.
|
||||||
|
fmt::print("Saving new configuration file {}\n", path.string());
|
||||||
|
} catch (...) {
|
||||||
|
fmt::print("Saving new configuration file\n");
|
||||||
}
|
}
|
||||||
fmt::print(PREFIX("Saving new configuration file {}\n"), path.native());
|
|
||||||
#undef PREFIX
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data["General"]["isPS4Pro"] = isNeo;
|
data["General"]["isPS4Pro"] = isNeo;
|
||||||
|
Loading…
Reference in New Issue
Block a user