From 22eb8747d345ecc27d409399d3556d0d5c08c48c Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sat, 29 Jan 2022 14:02:55 +0300 Subject: [PATCH] [GPU/Kernel] Fix space-prefixed hexadecimal number printing --- src/xenia/gpu/command_processor.cc | 4 ++-- src/xenia/gpu/primitive_processor.cc | 4 ++-- src/xenia/kernel/xam/content_manager.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xenia/gpu/command_processor.cc b/src/xenia/gpu/command_processor.cc index 07ff7f070..7a4ac4e23 100644 --- a/src/xenia/gpu/command_processor.cc +++ b/src/xenia/gpu/command_processor.cc @@ -402,7 +402,7 @@ uint32_t CommandProcessor::ExecutePrimaryBuffer(uint32_t read_index, uint32_t title_id = kernel_state_->GetExecutableModule() ? kernel_state_->GetExecutableModule()->title_id() : 0; - auto file_name = fmt::format("{:8X}_stream.xtr", title_id); + auto file_name = fmt::format("{:08X}_stream.xtr", title_id); auto path = trace_stream_path_ / file_name; trace_writer_.Open(path, title_id); InitializeTrace(); @@ -729,7 +729,7 @@ bool CommandProcessor::ExecutePacketType3(RingBuffer* reader, uint32_t packet) { } else if (trace_state_ == TraceState::kSingleFrame) { // New trace request - we only start tracing at the beginning of a frame. uint32_t title_id = kernel_state_->GetExecutableModule()->title_id(); - auto file_name = fmt::format("{:8X}_{}.xtr", title_id, counter_ - 1); + auto file_name = fmt::format("{:08X}_{}.xtr", title_id, counter_ - 1); auto path = trace_frame_path_ / file_name; trace_writer_.Open(path, title_id); InitializeTrace(); diff --git a/src/xenia/gpu/primitive_processor.cc b/src/xenia/gpu/primitive_processor.cc index 8dbe1ead3..fcb57634e 100644 --- a/src/xenia/gpu/primitive_processor.cc +++ b/src/xenia/gpu/primitive_processor.cc @@ -510,7 +510,7 @@ bool PrimitiveProcessor::Process(ProcessingResult& result_out) { SharedMemory::kBufferSize - guest_index_base < guest_index_buffer_needed_bytes) { XELOGE( - "Primitive processor: Index buffer at 0x{:8X}, 0x{:X} bytes " + "Primitive processor: Index buffer at 0x{:08X}, 0x{:X} bytes " "required, is out of the physical memory bounds", guest_index_base, guest_index_buffer_needed_bytes); assert_always(); @@ -814,7 +814,7 @@ bool PrimitiveProcessor::Process(ProcessingResult& result_out) { if (!shared_memory_.RequestRange(guest_index_base, guest_index_buffer_needed_bytes)) { XELOGE( - "PrimitiveProcessor: Failed to request index buffer 0x{:8X}, " + "PrimitiveProcessor: Failed to request index buffer 0x{:08X}, " "0x{:X} bytes needed, in the shared memory", guest_index_base, guest_index_buffer_needed_bytes); return false; diff --git a/src/xenia/kernel/xam/content_manager.cc b/src/xenia/kernel/xam/content_manager.cc index a4367a48b..883020ce9 100644 --- a/src/xenia/kernel/xam/content_manager.cc +++ b/src/xenia/kernel/xam/content_manager.cc @@ -245,7 +245,7 @@ X_RESULT ContentManager::DeleteContent(const XCONTENT_AGGREGATE_DATA& data) { } std::filesystem::path ContentManager::ResolveGameUserContentPath() { - auto title_id = fmt::format("{:8X}", kernel_state_->title_id()); + auto title_id = fmt::format("{:08X}", kernel_state_->title_id()); auto user_name = xe::to_path(kernel_state_->user_profile()->name()); // Per-game per-profile data location: