From f27ab7817741bcc4c3ffb41d9ccba83aa6b9002c Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 29 Dec 2024 19:06:14 +0100 Subject: [PATCH] Use .Value() everywhere needed in format arguments fmt 11 requires it. --- source/os.cpp | 10 +++++----- source/processes/dsp.cpp | 2 +- source/processes/fs.cpp | 4 ++-- source/video_core/src/video_core/shader_microcode.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/os.cpp b/source/os.cpp index 9460e90..18ccd86 100644 --- a/source/os.cpp +++ b/source/os.cpp @@ -1406,7 +1406,7 @@ void MemoryManager::TransferOwnership( std::shared_ptr old_ow const uint32_t chunk_addr = block_it->first; const uint32_t chunk_size = block_it->second.size_bytes; - fmt::print("Chunk: {:#x}-{:#x} (owner {})\n", chunk_addr, chunk_addr + chunk_size, fmt::ptr(block_it->second.owner.lock())); + fmt::print("Chunk: {:#x}-{:#x} (owner {})\n", chunk_addr, chunk_addr + chunk_size, fmt::ptr(block_it->second.owner.lock().get())); ValidateContract(!block_it->second.owner.expired()); @@ -3494,7 +3494,7 @@ void OS::TranslateIPCMessage(Thread& source, Thread& dest, bool is_reply) { } source.GetLogger()->info("{}Copying {}/{} bytes of static buffer data from {:#010x} to {:#010x} in thread {}:", - ThreadPrinter{source}, descriptor.static_buffer.size, dest_buffer_size, source_data_addr, + ThreadPrinter{source}, descriptor.static_buffer.size.Value(), dest_buffer_size, source_data_addr, dest_buffer_addr, ThreadPrinter{dest}); std::string data; auto max_size = std::min(64, descriptor.static_buffer.size); @@ -3544,7 +3544,7 @@ void OS::TranslateIPCMessage(Thread& source, Thread& dest, bool is_reply) { uint32_t static_buffer_offset = 0; source.GetLogger()->info("{}Setting up PXI buffer table {:#x} at address {:#x} in target process", - ThreadPrinter{source}, descriptor.pxi_buffer.id, dest_buffer_addr); + ThreadPrinter{source}, descriptor.pxi_buffer.id.Value(), dest_buffer_addr); auto base_physical_chunk = ResolveVirtualAddrWithSize(source.GetParentProcess(), buffer_address); if (!base_physical_chunk) { @@ -3581,7 +3581,7 @@ void OS::TranslateIPCMessage(Thread& source, Thread& dest, bool is_reply) { dest.WriteMemory32(dest_buffer_addr + static_buffer_offset + 4, buffer_size); source.GetLogger()->info("Added PXI physical memory chunk {:#x} of size {:#x} in static buffer {} at {:#x}", - base_physical_chunk->first, buffer_size, descriptor.pxi_buffer.id, dest_buffer_addr + static_buffer_offset); + base_physical_chunk->first, buffer_size, descriptor.pxi_buffer.id.Value(), dest_buffer_addr + static_buffer_offset); static_buffer_offset += 8; @@ -3613,7 +3613,7 @@ void OS::TranslateIPCMessage(Thread& source, Thread& dest, bool is_reply) { dest.WriteMemory32(dest_buffer_addr + static_buffer_offset + 4, chunk_size); source.GetLogger()->info("Added PXI physical memory chunk {:#x} of size {:#x} in static buffer {} at {:#x}", - physical_chunk_address, chunk_size, descriptor.pxi_buffer.id, dest_buffer_addr + static_buffer_offset); + physical_chunk_address, chunk_size, descriptor.pxi_buffer.id.Value(), dest_buffer_addr + static_buffer_offset); static_buffer_offset += 8; diff --git a/source/processes/dsp.cpp b/source/processes/dsp.cpp index 3be5c63..73a1430 100644 --- a/source/processes/dsp.cpp +++ b/source/processes/dsp.cpp @@ -785,7 +785,7 @@ void FakeDSP::OnIPCRequest(FakeThread& thread, Handle sender, const IPC::Command default: // TODO: Throw and catch IPCError instead - throw std::runtime_error(fmt::format("Unknown DSP IPC request {:#x}", header.command_id)); + throw std::runtime_error(fmt::format("Unknown DSP IPC request {:#x}", header.command_id.Value())); } } diff --git a/source/processes/fs.cpp b/source/processes/fs.cpp index 98d5743..92f46dc 100644 --- a/source/processes/fs.cpp +++ b/source/processes/fs.cpp @@ -1818,7 +1818,7 @@ static decltype(HLE::OS::ServiceHelper::SendReply) OnFileIPCRequest(FakeThread& return HLE::OS::ServiceHelper::SendReply; } catch (std::ios_base::failure& err) { thread.GetLogger()->error("Unexpected fstream exception in File IPC command {:#x} handled via object {}: {}", - header.command_id, boost::core::demangle(typeid(*file).name()), + header.command_id.Value(), boost::core::demangle(typeid(*file).name()), IosExceptionInfo(err)); throw; } @@ -1860,7 +1860,7 @@ static decltype(HLE::OS::ServiceHelper::SendReply) OnDirIPCRequest(FakeThread& t return HLE::OS::ServiceHelper::SendReply; } catch (std::ios_base::failure& err) { thread.GetLogger()->error("Unexpected fstream exception in Directory IPC command {:#x} handled via object {}: {}", - header.command_id, boost::core::demangle(typeid(dir).name()), + header.command_id.Value(), boost::core::demangle(typeid(dir).name()), IosExceptionInfo(err)); throw; } diff --git a/source/video_core/src/video_core/shader_microcode.cpp b/source/video_core/src/video_core/shader_microcode.cpp index 7ec6baa..73448d2 100644 --- a/source/video_core/src/video_core/shader_microcode.cpp +++ b/source/video_core/src/video_core/shader_microcode.cpp @@ -1554,7 +1554,7 @@ std::unique_ptr CreateMicroCodeRecompiler(Context& context) try { auto vis = VisualizeShaderControlFlowGraph(prog, context.shader_memory.data(), context.shader_memory.size(), context.swizzle_data.data(), context.swizzle_data.size()); // std::cerr << vis << "\n"; - throw std::runtime_error(fmt::format("OMG: {:#x}", context.registers.vs_main_offset)); + throw std::runtime_error(fmt::format("OMG: {:#x}", context.registers.vs_main_offset.Value())); } } // namespace Pica::VertexShader