Skip to content

Commit

Permalink
Merge branch 'shadps4-emu:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolix29 authored Sep 26, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 7d54e26 + eef0e6f commit 98a36f4
Showing 29 changed files with 23,376 additions and 24,361 deletions.
3 changes: 3 additions & 0 deletions src/common/config.cpp
Original file line number Diff line number Diff line change
@@ -15,6 +15,9 @@ std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
std::filesystem::path opt) {
try {
auto str = find<std::string>(v, ky);
if (str.empty()) {
return opt;
}
std::u8string u8str{(char8_t*)&str.front(), (char8_t*)&str.back() + 1};
return std::filesystem::path{u8str};
} catch (...) {
2 changes: 1 addition & 1 deletion src/common/logging/formatter.h
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ struct UTF {
T data;

explicit UTF(const std::u8string_view view) {
data = T{(const char*)&view.front(), (const char*)&view.back() + 1};
data = view.empty() ? T{} : T{(const char*)&view.front(), (const char*)&view.back() + 1};
}

explicit UTF(const std::u8string& str) : UTF(std::u8string_view{str}) {}
Loading

0 comments on commit 98a36f4

Please sign in to comment.