From 2fb697322f77fc30969692c63972a567b8bfb573 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 21 Dec 2025 14:00:36 +0100 Subject: [PATCH] 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 --- Utilities/sync.h | 20 ++++++++++---------- rpcs3/Emu/RSX/Overlays/overlay_fonts.cpp | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Utilities/sync.h b/Utilities/sync.h index 2d805ff14c..513a45ee51 100644 --- a/Utilities/sync.h +++ b/Utilities/sync.h @@ -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_BITSET_PRIVATE: { - if (timeout) - { - const uint64_t nsec = timeout->tv_nsec + timeout->tv_sec * 1000000000ull; - return os_sync_wait_on_address_with_timeout(const_cast(uaddr), static_cast(val), sizeof(uint), OS_SYNC_WAIT_ON_ADDRESS_NONE, OS_CLOCK_MACH_ABSOLUTE_TIME, nsec); - } - else - { - return os_sync_wait_on_address(const_cast(uaddr), static_cast(val), sizeof(uint), OS_SYNC_WAIT_ON_ADDRESS_NONE); - } + if (timeout) + { + const uint64_t nsec = timeout->tv_nsec + timeout->tv_sec * 1000000000ull; + return os_sync_wait_on_address_with_timeout(const_cast(uaddr), static_cast(val), sizeof(uint), OS_SYNC_WAIT_ON_ADDRESS_NONE, OS_CLOCK_MACH_ABSOLUTE_TIME, nsec); + } + else + { + return os_sync_wait_on_address(const_cast(uaddr), static_cast(val), sizeof(uint), OS_SYNC_WAIT_ON_ADDRESS_NONE); + } } case FUTEX_WAKE_PRIVATE: @@ -100,7 +100,7 @@ inline int futex(volatile void* uaddr, int futex_op, uint val, const timespec* t { for (;;) { - int ret = 0; + int ret = 0; if (val == INT32_MAX) { ret = os_sync_wake_by_address_all(const_cast(uaddr), sizeof(uint), OS_SYNC_WAKE_BY_ADDRESS_NONE); diff --git a/rpcs3/Emu/RSX/Overlays/overlay_fonts.cpp b/rpcs3/Emu/RSX/Overlays/overlay_fonts.cpp index d6fc7eabb9..91ef3f13d9 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_fonts.cpp +++ b/rpcs3/Emu/RSX/Overlays/overlay_fonts.cpp @@ -213,7 +213,7 @@ namespace rsx 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)) { @@ -262,7 +262,7 @@ namespace rsx { if (fallback_bytes.empty()) { - fmt::throw_exception("Failed to initialize font for character 0x%x on codepage %d.", static_cast(c), static_cast(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(c), static_cast(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(c), static_cast(codepage_id), fallback_file);