overlays: log font lookup info on exception (#17903)

- Logs the font lookup dirs and the target fonts when no font was found
in the native overlay
This commit is contained in:
Megamouse
2025-12-21 14:00:36 +01:00
committed by GitHub
parent 73bcabf7d5
commit 2fb697322f
2 changed files with 12 additions and 12 deletions
+10 -10
View File
@@ -84,15 +84,15 @@ inline int futex(volatile void* uaddr, int futex_op, uint val, const timespec* t
case FUTEX_WAIT_PRIVATE: case FUTEX_WAIT_PRIVATE:
case FUTEX_WAIT_BITSET_PRIVATE: case FUTEX_WAIT_BITSET_PRIVATE:
{ {
if (timeout) if (timeout)
{ {
const uint64_t nsec = timeout->tv_nsec + timeout->tv_sec * 1000000000ull; const uint64_t nsec = timeout->tv_nsec + timeout->tv_sec * 1000000000ull;
return os_sync_wait_on_address_with_timeout(const_cast<void*>(uaddr), static_cast<uint64_t>(val), sizeof(uint), OS_SYNC_WAIT_ON_ADDRESS_NONE, OS_CLOCK_MACH_ABSOLUTE_TIME, nsec); return os_sync_wait_on_address_with_timeout(const_cast<void*>(uaddr), static_cast<uint64_t>(val), sizeof(uint), OS_SYNC_WAIT_ON_ADDRESS_NONE, OS_CLOCK_MACH_ABSOLUTE_TIME, nsec);
} }
else else
{ {
return os_sync_wait_on_address(const_cast<void*>(uaddr), static_cast<uint64_t>(val), sizeof(uint), OS_SYNC_WAIT_ON_ADDRESS_NONE); return os_sync_wait_on_address(const_cast<void*>(uaddr), static_cast<uint64_t>(val), sizeof(uint), OS_SYNC_WAIT_ON_ADDRESS_NONE);
} }
} }
case FUTEX_WAKE_PRIVATE: case FUTEX_WAKE_PRIVATE:
@@ -100,7 +100,7 @@ inline int futex(volatile void* uaddr, int futex_op, uint val, const timespec* t
{ {
for (;;) for (;;)
{ {
int ret = 0; int ret = 0;
if (val == INT32_MAX) if (val == INT32_MAX)
{ {
ret = os_sync_wake_by_address_all(const_cast<void*>(uaddr), sizeof(uint), OS_SYNC_WAKE_BY_ADDRESS_NONE); ret = os_sync_wake_by_address_all(const_cast<void*>(uaddr), sizeof(uint), OS_SYNC_WAKE_BY_ADDRESS_NONE);
+2 -2
View File
@@ -213,7 +213,7 @@ namespace rsx
return font_found; return font_found;
}; };
for (const auto& font_file : fs_settings.font_names) for (const std::string& font_file : fs_settings.font_names)
{ {
if (fs::is_file(font_file)) if (fs::is_file(font_file))
{ {
@@ -262,7 +262,7 @@ namespace rsx
{ {
if (fallback_bytes.empty()) if (fallback_bytes.empty())
{ {
fmt::throw_exception("Failed to initialize font for character 0x%x on codepage %d.", static_cast<u32>(c), static_cast<u32>(codepage_id)); fmt::throw_exception("Failed to initialize font for character 0x%x on codepage %d.\nLookup dirs:\n%s\nTarget fonts:\n%s", static_cast<u32>(c), static_cast<u32>(codepage_id), fmt::merge(fs_settings.lookup_font_dirs, "\n"), fmt::merge(fs_settings.font_names, "\n"));
} }
rsx_log.error("Failed to initialize font for character 0x%x on codepage %d. Falling back to font '%s'", static_cast<u32>(c), static_cast<u32>(codepage_id), fallback_file); rsx_log.error("Failed to initialize font for character 0x%x on codepage %d. Falling back to font '%s'", static_cast<u32>(c), static_cast<u32>(codepage_id), fallback_file);