From 83b1e072990e839903c67401d1a6d7d1910a5824 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 1 Oct 2026 08:49:22 +0200 Subject: [PATCH] Fix some log messages --- Utilities/StrFmt.cpp | 2 +- Utilities/Thread.cpp | 2 +- Utilities/bin_patch.cpp | 4 ++-- rpcs3/Emu/Cell/Modules/cellCamera.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellGem.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellHttp.cpp | 2 +- rpcs3/Emu/Cell/Modules/cellSearch.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_fs.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_net.cpp | 6 +++--- rpcs3/Emu/Cell/lv2/sys_sm.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_storage.cpp | 2 +- rpcs3/Emu/RSX/NV47/HW/nv3089.cpp | 2 +- rpcs3/Emu/RSX/rsx_methods.cpp | 2 +- rpcs3/Emu/System.cpp | 2 +- rpcs3/Loader/PSF.cpp | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Utilities/StrFmt.cpp b/Utilities/StrFmt.cpp index d2367e8257..35ec004f6b 100644 --- a/Utilities/StrFmt.cpp +++ b/Utilities/StrFmt.cpp @@ -612,7 +612,7 @@ void fmt_class_string::format(std::string& out, u64 arg) #ifdef _WIN32 if (DWORD error = GetLastError()) { - fmt::append(out, " (error=%s)", error, fmt::win_error_to_string(error)); + fmt::append(out, " (error=%s)", fmt::win_error_to_string(error)); } #else if (int error = errno) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 747a2181d8..322333c113 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -386,7 +386,7 @@ void decode_x64_reg_op(const u8* code, x64_op_t& out_op, x64_reg_t& out_reg, usz case 0x67: // group 4 { - sig_log.error("decode_x64_reg_op(%016llxh): address-size override prefix found", code - out_length, prefix); + sig_log.error("decode_x64_reg_op(%016llxh): address-size override prefix found", code - out_length); out_op = X64OP_NONE; out_reg = X64_NOT_SET; out_size = 0; diff --git a/Utilities/bin_patch.cpp b/Utilities/bin_patch.cpp index 050d7159de..61d1743c24 100644 --- a/Utilities/bin_patch.cpp +++ b/Utilities/bin_patch.cpp @@ -1190,7 +1190,7 @@ static usz apply_modification(std::vector& applied, patch_engine::patch_inf if (!addr) { - patch_log.error("Failed to allocate 0x%x bytes for code (entry=0x%x)", alloc_size, addr, out_branch); + patch_log.error("Failed to allocate 0x%x bytes for code (entry=0x%x)", alloc_size, out_branch); continue; } @@ -1436,7 +1436,7 @@ static usz apply_modification(std::vector& applied, patch_engine::patch_inf if (dest_path.empty()) { - patch_log.error("Failed to patch file path at '%s': destination is not mounted", original_vfs_path, dest_vfs_path); + patch_log.error("Failed to patch file path at '%s': destination is not mounted", original_vfs_path); continue; } diff --git a/rpcs3/Emu/Cell/Modules/cellCamera.cpp b/rpcs3/Emu/Cell/Modules/cellCamera.cpp index a0da0309c7..281f11c4b2 100644 --- a/rpcs3/Emu/Cell/Modules/cellCamera.cpp +++ b/rpcs3/Emu/Cell/Modules/cellCamera.cpp @@ -1998,7 +1998,7 @@ bool camera_context::on_handler_state(camera_handler_base::camera_handler_state { if (!is_attached) { - cellCamera.warning("Camera handler not attached. Sending attach event...", static_cast(state)); + cellCamera.warning("Camera handler not attached (state=%d). Sending attach event...", static_cast(state)); is_attached = true; is_attached_dirty = true; } diff --git a/rpcs3/Emu/Cell/Modules/cellGem.cpp b/rpcs3/Emu/Cell/Modules/cellGem.cpp index e5bd543263..02a56df2aa 100644 --- a/rpcs3/Emu/Cell/Modules/cellGem.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGem.cpp @@ -3085,7 +3085,7 @@ error_code cellGemGetAccelerometerPositionInDevice(u32 gem_num, vm::ptr pos error_code cellGemGetAllTrackableHues(vm::ptr hues) { - cellGem.todo("cellGemGetAllTrackableHues(hues=*0x%x)"); + cellGem.todo("cellGemGetAllTrackableHues(hues=*0x%x)", hues); auto& gem = g_fxo->get(); diff --git a/rpcs3/Emu/Cell/Modules/cellHttp.cpp b/rpcs3/Emu/Cell/Modules/cellHttp.cpp index 6254315ecc..71ccd45102 100644 --- a/rpcs3/Emu/Cell/Modules/cellHttp.cpp +++ b/rpcs3/Emu/Cell/Modules/cellHttp.cpp @@ -3702,7 +3702,7 @@ error_code cellHttpEndExternalCache() error_code cellHttpInitExternalCache(vm::ptr buf, u32 size) { - cellHttp.todo("cellHttpInitExternalCache(buf=*0x%x, size=0x%x)", size); + cellHttp.todo("cellHttpInitExternalCache(buf=*0x%x, size=0x%x)", buf, size); auto& man = g_fxo->get(); std::lock_guard lock(man.mtx); diff --git a/rpcs3/Emu/Cell/Modules/cellSearch.cpp b/rpcs3/Emu/Cell/Modules/cellSearch.cpp index 5d279b2866..e1284df3b2 100644 --- a/rpcs3/Emu/Cell/Modules/cellSearch.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSearch.cpp @@ -1808,7 +1808,7 @@ error_code cellSearchGetMusicSelectionContext(CellSearchId searchId, vm::cptr _arg, u32 if (op == 0x8000000b && file->type != lv2_file_type::regular && arg->size) { - sys_fs.error("%s type: Writing %u bytes to FD=%d (path=%s)", file->type, arg->size, file->name.data()); + sys_fs.error("%s type: Writing %u bytes to FD=%d (path=%s)", file->type, arg->size, fd, file->name.data()); } if (op == 0x8000000a && file->type != lv2_file_type::regular && arg->size >= 0x100000) diff --git a/rpcs3/Emu/Cell/lv2/sys_net.cpp b/rpcs3/Emu/Cell/lv2/sys_net.cpp index e6e5a1b0b7..9f5b23b5e9 100644 --- a/rpcs3/Emu/Cell/lv2/sys_net.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_net.cpp @@ -790,7 +790,7 @@ error_code sys_net_bnet_recvfrom(ppu_thread& ppu, s32 s, vm::ptr buf, u32 if (flags & ~(SYS_NET_MSG_PEEK | SYS_NET_MSG_DONTWAIT | SYS_NET_MSG_WAITALL | SYS_NET_MSG_USECRYPTO | SYS_NET_MSG_USESIGNATURE)) { - fmt::throw_exception("sys_net_bnet_recvfrom(s=%d): unknown flags (0x%x)", flags); + fmt::throw_exception("sys_net_bnet_recvfrom(s=%d): unknown flags (0x%x)", s, flags); } s32 result = 0; @@ -919,7 +919,7 @@ error_code sys_net_bnet_sendmsg(ppu_thread& ppu, s32 s, vm::cptr if (flags & ~(SYS_NET_MSG_DONTWAIT | SYS_NET_MSG_WAITALL | SYS_NET_MSG_USECRYPTO | SYS_NET_MSG_USESIGNATURE)) { - fmt::throw_exception("sys_net_bnet_sendmsg(s=%d): unknown flags (0x%x)", flags); + fmt::throw_exception("sys_net_bnet_sendmsg(s=%d): unknown flags (0x%x)", s, flags); } s32 result{}; @@ -998,7 +998,7 @@ error_code sys_net_bnet_sendto(ppu_thread& ppu, s32 s, vm::cptr buf, u32 l if (flags & ~(SYS_NET_MSG_DONTWAIT | SYS_NET_MSG_WAITALL | SYS_NET_MSG_USECRYPTO | SYS_NET_MSG_USESIGNATURE)) { - fmt::throw_exception("sys_net_bnet_sendto(s=%d): unknown flags (0x%x)", flags); + fmt::throw_exception("sys_net_bnet_sendto(s=%d): unknown flags (0x%x)", s, flags); } if (addr && addrlen < sizeof(sys_net_sockaddr)) diff --git a/rpcs3/Emu/Cell/lv2/sys_sm.cpp b/rpcs3/Emu/Cell/lv2/sys_sm.cpp index 13b7feb737..08c3153f83 100644 --- a/rpcs3/Emu/Cell/lv2/sys_sm.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_sm.cpp @@ -24,7 +24,7 @@ error_code sys_sm_get_params(vm::ptr a, vm::ptr b, vm::ptr c, vm::p error_code sys_sm_get_ext_event2(vm::ptr a1, vm::ptr a2, vm::ptr a3, u64 a4) { - sys_sm.trace("sys_sm_get_ext_event2(a1=*0x%x, a2=*0x%x, a3=*0x%x, a4=*0x%x, a4=0x%xll", a1, a2, a3, a4); + sys_sm.trace("sys_sm_get_ext_event2(a1=*0x%x, a2=*0x%x, a3=*0x%x, a4=*0x%x, a4=0x%xll", a1, a2, a3, a4, a4); if (a4 != 0 && a4 != 1) { diff --git a/rpcs3/Emu/Cell/lv2/sys_storage.cpp b/rpcs3/Emu/Cell/lv2/sys_storage.cpp index d5ee3bbdae..091972150d 100644 --- a/rpcs3/Emu/Cell/lv2/sys_storage.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_storage.cpp @@ -107,7 +107,7 @@ error_code sys_storage_write(u32 fd, u32 mode, u32 start_sector, u32 num_sectors error_code sys_storage_send_device_command(u32 dev_handle, u64 cmd, vm::ptr in, u64 inlen, vm::ptr out, u64 outlen) { - sys_storage.todo("sys_storage_send_device_command(dev_handle=0x%x, cmd=0x%llx, in=*0x%, inlen=0x%x, out=*0x%x, outlen=0x%x)", dev_handle, cmd, in, inlen, out, outlen); + sys_storage.todo("sys_storage_send_device_command(dev_handle=0x%x, cmd=0x%llx, in=*0x%x, inlen=0x%x, out=*0x%x, outlen=0x%x)", dev_handle, cmd, in, inlen, out, outlen); return CELL_OK; } diff --git a/rpcs3/Emu/RSX/NV47/HW/nv3089.cpp b/rpcs3/Emu/RSX/NV47/HW/nv3089.cpp index 6e2e7162bc..2a9680d332 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv3089.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/nv3089.cpp @@ -196,7 +196,7 @@ namespace rsx if (!dst_address) { - rsx_log.error("NV3089_IMAGE_IN_SIZE: Unmapped dst_address (dst_offset=0x%x, dst_dma=0x%dx)", dst_offset, dst_dma); + rsx_log.error("NV3089_IMAGE_IN_SIZE: Unmapped dst_address (dst_offset=0x%x, dst_dma=0x%x)", dst_offset, dst_dma); RSX(ctx)->recover_fifo(); return { false, src_info, dst_info }; } diff --git a/rpcs3/Emu/RSX/rsx_methods.cpp b/rpcs3/Emu/RSX/rsx_methods.cpp index bdc7519f9a..0a5068b39c 100644 --- a/rpcs3/Emu/RSX/rsx_methods.cpp +++ b/rpcs3/Emu/RSX/rsx_methods.cpp @@ -790,7 +790,7 @@ namespace rsx { if (methods[id] && state_signals[id]) { - rsx_log.error("FIXME: Method register 0x%x is registered as a method and signal. The signal will be ignored."); + rsx_log.error("FIXME: Method register 0x%x is registered as a method and signal. The signal will be ignored.", id); } } } diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index f951a10cf4..b1b5b86fa6 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1532,7 +1532,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, if (m_title_id.size() < 3 && m_title_id.find_first_not_of('.') == umax) { // Do not allow if TITLE_ID result in path redirection - sys_log.fatal("Game directory not found using GAMEID token. (m_path='%s', title_id='%s')", m_title_id); + sys_log.fatal("Game directory not found using GAMEID token. (m_path='%s', title_id='%s')", m_path, m_title_id); return game_boot_result::invalid_file_or_folder; } diff --git a/rpcs3/Loader/PSF.cpp b/rpcs3/Loader/PSF.cpp index 2efa896109..6c2670a178 100644 --- a/rpcs3/Loader/PSF.cpp +++ b/rpcs3/Loader/PSF.cpp @@ -411,7 +411,7 @@ namespace psf else { // TODO: Better logging of other types - psf_log.error("Entry %s is invalid.%s", key, value.as_string(), src_loc); + psf_log.error("Entry %s is invalid.%s", key, src_loc); } // Do not break, run over all entries in order to report all errors