diff --git a/src/xenia/apu/xma_context_new.cc b/src/xenia/apu/xma_context_new.cc index 11d19e019..b76984c39 100644 --- a/src/xenia/apu/xma_context_new.cc +++ b/src/xenia/apu/xma_context_new.cc @@ -323,7 +323,7 @@ void XmaContextNew::Decode(XMA_CONTEXT_DATA* data) { "Processing context {} (offset {}, buffer {}, ptr {:p}, output buffer " "{:08X}, output buffer count {})", id(), data->input_buffer_read_offset, data->current_buffer, - current_input_buffer, data->output_buffer_ptr, + static_cast(current_input_buffer), data->output_buffer_ptr, data->output_buffer_block_count); const uint32_t current_input_size = GetCurrentInputBufferSize(data); diff --git a/src/xenia/apu/xma_context_old.cc b/src/xenia/apu/xma_context_old.cc index 85420bdbb..a4e668d4e 100644 --- a/src/xenia/apu/xma_context_old.cc +++ b/src/xenia/apu/xma_context_old.cc @@ -357,7 +357,7 @@ void XmaContextOld::Decode(XMA_CONTEXT_DATA* data) { "Processing context {} (offset {}, buffer {}, ptr {:p}, output buffer " "{:08X}, output buffer count {})", id(), data->input_buffer_read_offset, data->current_buffer, - current_input_buffer, data->output_buffer_ptr, + static_cast(current_input_buffer), data->output_buffer_ptr, data->output_buffer_block_count); if (is_stream_done_) { diff --git a/src/xenia/cpu/mmio_handler.cc b/src/xenia/cpu/mmio_handler.cc index d676c4ada..6961c052e 100644 --- a/src/xenia/cpu/mmio_handler.cc +++ b/src/xenia/cpu/mmio_handler.cc @@ -465,7 +465,8 @@ bool MMIOHandler::ExceptionCallback(Exception* ex) { auto p = reinterpret_cast(rip); DecodedLoadStore decoded_load_store; if (!TryDecodeLoadStore(p, decoded_load_store)) { - XELOGE("Unable to decode MMIO load or store instruction at {}", p); + XELOGE("Unable to decode MMIO load or store instruction at {}", + static_cast(p)); assert_always("Unknown MMIO instruction type"); return false; } diff --git a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc index 9dadff46e..7f422ea4f 100644 --- a/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc +++ b/src/xenia/gpu/d3d12/d3d12_render_target_cache.cc @@ -20,6 +20,7 @@ #include #include "third_party/dxbc/DXBCChecksum.h" +#include "third_party/fmt/include/fmt/xchar.h" #include "xenia/base/assert.h" #include "xenia/base/cvar.h" diff --git a/src/xenia/gpu/d3d12/pipeline_cache.cc b/src/xenia/gpu/d3d12/pipeline_cache.cc index 6defad83a..fae3c9b50 100644 --- a/src/xenia/gpu/d3d12/pipeline_cache.cc +++ b/src/xenia/gpu/d3d12/pipeline_cache.cc @@ -43,6 +43,8 @@ #include "xenia/gpu/xenos.h" #include "xenia/ui/d3d12/d3d12_util.h" +#include "third_party/fmt/include/fmt/xchar.h" + DEFINE_bool(d3d12_dxbc_disasm, false, "Disassemble DXBC shaders after generation.", "D3D12"); DEFINE_bool( diff --git a/src/xenia/gpu/draw_util.cc b/src/xenia/gpu/draw_util.cc index 97e6807b4..f3210ae50 100644 --- a/src/xenia/gpu/draw_util.cc +++ b/src/xenia/gpu/draw_util.cc @@ -1072,8 +1072,9 @@ bool GetResolveInfo(const RegisterFile& regs, const Memory& memory, "Incorrect resolve sample selected for {}-sample {}: {}, treating like " "{}", 1 << uint32_t(rb_surface_info.msaa_samples), - is_depth ? "depth" : "color", rb_copy_control.copy_sample_select, - sample_select); + is_depth ? "depth" : "color", + static_cast(rb_copy_control.copy_sample_select), + static_cast(sample_select)); } info_out.copy_dest_coordinate_info.copy_sample_select = sample_select; // Get the format to pass to the shader in a unified way - for depth (for diff --git a/src/xenia/gpu/pm4_command_processor_implement.h b/src/xenia/gpu/pm4_command_processor_implement.h index 739599dde..3cb6fbb91 100644 --- a/src/xenia/gpu/pm4_command_processor_implement.h +++ b/src/xenia/gpu/pm4_command_processor_implement.h @@ -90,9 +90,9 @@ void COMMAND_PROCESSOR::DisassembleCurrentPacket() XE_RESTRICT { packet_info.count, packet_info.predicated); #define LOG_ACTION_FIELD(__type, name) \ - logger("\t" #name " = {:08X}\n", action.__type.name) + logger("\t" #name " = {:08X}\n", static_cast(action.__type.name)) #define LOG_ACTION_FIELD_DEC(__type, name) \ - logger("\t" #name " = {}\n", action.__type.name) + logger("\t" #name " = {}\n", static_cast(action.__type.name)) #define LOG_ENDIANNESS(__type, name) \ logger("\t" #name " = {}\n", \ diff --git a/src/xenia/hid/sdl/sdl_input_driver.cc b/src/xenia/hid/sdl/sdl_input_driver.cc index b04c5a3a0..344707b0d 100644 --- a/src/xenia/hid/sdl/sdl_input_driver.cc +++ b/src/xenia/hid/sdl/sdl_input_driver.cc @@ -485,9 +485,10 @@ void SDLInputDriver::OnControllerDeviceAdded(const SDL_Event& event) { "ProductID(0x{:04X}), " "GUID({})", SDL_GameControllerName(controller), - SDL_JoystickGetType(SDL_GameControllerGetJoystick(controller)), + static_cast( + SDL_JoystickGetType(SDL_GameControllerGetJoystick(controller))), #if SDL_VERSION_ATLEAST(2, 0, 12) - SDL_GameControllerGetType(controller), + static_cast(SDL_GameControllerGetType(controller)), #else "?", #endif diff --git a/src/xenia/hid/winkey/winkey_input_driver.cc b/src/xenia/hid/winkey/winkey_input_driver.cc index 601112c99..22aa1cbaa 100644 --- a/src/xenia/hid/winkey/winkey_input_driver.cc +++ b/src/xenia/hid/winkey/winkey_input_driver.cc @@ -79,7 +79,8 @@ void WinKeyInputDriver::ParseKeyBinding(ui::VirtualKey output_key, key_bindings_.push_back(key_binding); XELOGI("winkey: \"{}\" binds key 0x{:X} to controller input {}.", - source_token, key_binding.input_key, description); + source_token, static_cast(key_binding.input_key), + description); } } diff --git a/src/xenia/kernel/kernel_state.cc b/src/xenia/kernel/kernel_state.cc index 7504c77b0..8b9bbe34f 100644 --- a/src/xenia/kernel/kernel_state.cc +++ b/src/xenia/kernel/kernel_state.cc @@ -1069,7 +1069,8 @@ bool KernelState::Save(ByteStream* stream) { stream->Write(static_cast(object->type())); if (!object->Save(stream)) { - XELOGD("Did not save object of type {}", object->type()); + XELOGD("Did not save object of type {}", + static_cast(object->type())); assert_always(); // Revert backwards and overwrite if a save failed. diff --git a/src/xenia/kernel/user_module.cc b/src/xenia/kernel/user_module.cc index 474068482..d153cf341 100644 --- a/src/xenia/kernel/user_module.cc +++ b/src/xenia/kernel/user_module.cc @@ -135,7 +135,7 @@ X_STATUS UserModule::LoadFromMemory(const void* addr, const size_t length) { XELOGE("XNA executables are not yet implemented"); return X_STATUS_NOT_IMPLEMENTED; } else { - XELOGE("Unknown module magic: {:08X}", magic); + XELOGE("Unknown module magic: {:08X}", magic.get()); return X_STATUS_NOT_IMPLEMENTED; } } @@ -661,8 +661,8 @@ void UserModule::Dump() { for (uint32_t i = 0; i < opt_alternate_title_id->count(); i++) { if (opt_alternate_title_id->values[i] != 0) { - title_ids.append( - fmt::format(" {:08X},", opt_alternate_title_id->values[i])); + title_ids.append(fmt::format( + " {:08X},", opt_alternate_title_id->values[i].get())); } } // Remove last character as it is not necessary diff --git a/src/xenia/kernel/xam/achievement_manager.cc b/src/xenia/kernel/xam/achievement_manager.cc index 28abe2624..5100b154b 100644 --- a/src/xenia/kernel/xam/achievement_manager.cc +++ b/src/xenia/kernel/xam/achievement_manager.cc @@ -221,7 +221,7 @@ bool AchievementManager::DoesAchievementExist( void AchievementManager::ShowAchievementEarnedNotification( const AchievementGpdStructure* achievement) const { const std::string description = - fmt::format("{}G - {}", achievement->gamerscore, + fmt::format("{}G - {}", achievement->gamerscore.get(), xe::to_utf8(xe::load_and_swap( achievement->achievement_name.c_str()))); diff --git a/src/xenia/kernel/xam/apps/xam_app.cc b/src/xenia/kernel/xam/apps/xam_app.cc index 6d0bad811..d2b131cdf 100644 --- a/src/xenia/kernel/xam/apps/xam_app.cc +++ b/src/xenia/kernel/xam/apps/xam_app.cc @@ -102,7 +102,7 @@ X_HRESULT XamApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr, memory_->TranslateVirtual(data->deployment_type_ptr); *deployment_type = static_cast(kernel_state_->deployment_type_); XELOGD("XTitleGetDeploymentType({:08X}, {:08X}", - data->deployment_type_ptr, data->overlapped_ptr); + data->deployment_type_ptr.get(), data->overlapped_ptr.get()); return X_E_SUCCESS; } } diff --git a/src/xenia/kernel/xam/apps/xmp_app.cc b/src/xenia/kernel/xam/apps/xmp_app.cc index cceae3726..80ec50d71 100644 --- a/src/xenia/kernel/xam/apps/xmp_app.cc +++ b/src/xenia/kernel/xam/apps/xmp_app.cc @@ -250,7 +250,8 @@ X_HRESULT XmpApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr, static_assert_size(decltype(*args), 8); assert_true(args->xmp_client == 0x00000002); - XELOGD("XMPSetVolume({:d}, {:g})", args->xmp_client, float(args->value)); + XELOGD("XMPSetVolume({:d}, {:g})", args->xmp_client.get(), + float(args->value)); kernel_state_->emulator()->audio_media_player()->SetVolume( float(args->value)); return X_E_SUCCESS; @@ -476,8 +477,8 @@ X_HRESULT XmpApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr, static_assert_size(decltype(*args), 16); XELOGD("XMPCaptureOutput({:08X}, {:08X}, {:08X}, {:08X})", - args->xmp_client, args->callback, args->context, - args->title_render); + args->xmp_client.get(), args->callback.get(), args->context.get(), + args->title_render.get()); kernel_state_->emulator()->audio_media_player()->SetCaptureCallback( args->callback, args->context, static_cast(args->title_render)); return X_E_SUCCESS; diff --git a/src/xenia/kernel/xam/content_manager.cc b/src/xenia/kernel/xam/content_manager.cc index ca833e400..5f0cc0035 100644 --- a/src/xenia/kernel/xam/content_manager.cc +++ b/src/xenia/kernel/xam/content_manager.cc @@ -175,7 +175,7 @@ std::unordered_set ContentManager::FindPublisherTitleIds( for (const auto& entry : publisher_entries) { std::filesystem::path path_to_publisher_dir = entry.path / entry.name / - fmt::format("{:08X}", XContentType::kPublisher); + fmt::format("{:08X}", static_cast(XContentType::kPublisher)); if (!std::filesystem::exists(path_to_publisher_dir)) { continue; diff --git a/src/xenia/kernel/xam/profile_manager.cc b/src/xenia/kernel/xam/profile_manager.cc index e533af58a..5106df8fb 100644 --- a/src/xenia/kernel/xam/profile_manager.cc +++ b/src/xenia/kernel/xam/profile_manager.cc @@ -364,7 +364,9 @@ std::vector ProfileManager::FindProfiles() const { if (!std::filesystem::exists( profile.path / profile.name / kDashboardStringID / - fmt::format("{:08X}", XContentType::kProfile) / profile.name)) { + fmt::format("{:08X}", + static_cast(XContentType::kProfile)) / + profile.name)) { XELOGE("Profile {} doesn't have profile package!", profile_xuid); continue; } @@ -444,7 +446,8 @@ std::filesystem::path ProfileManager::GetProfilePath( std::filesystem::path ProfileManager::GetProfilePath( const std::string xuid) const { return kernel_state_->emulator()->content_root() / xuid / kDashboardStringID / - fmt::format("{:08X}", XContentType::kProfile) / xuid; + fmt::format("{:08X}", static_cast(XContentType::kProfile)) / + xuid; } bool ProfileManager::CreateProfile(const std::string gamertag, bool autologin, diff --git a/src/xenia/kernel/xam/xam_info.cc b/src/xenia/kernel/xam/xam_info.cc index 572648c37..dca8e937a 100644 --- a/src/xenia/kernel/xam/xam_info.cc +++ b/src/xenia/kernel/xam/xam_info.cc @@ -32,6 +32,7 @@ #endif #include "third_party/fmt/include/fmt/format.h" +#include "third_party/fmt/include/fmt/xchar.h" DEFINE_int32(avpack, 8, "Video modes\n" diff --git a/src/xenia/kernel/xam/xam_msg.cc b/src/xenia/kernel/xam/xam_msg.cc index 3a1b83c3f..e7ba8b921 100644 --- a/src/xenia/kernel/xam/xam_msg.cc +++ b/src/xenia/kernel/xam/xam_msg.cc @@ -25,7 +25,8 @@ dword_result_t XMsgInProcessCall_entry(dword_t app, dword_t message, auto result = kernel_state()->app_manager()->DispatchMessageSync(app, message, arg1, arg2); if (result == X_ERROR_NOT_FOUND) { - XELOGE("XMsgInProcessCall: app {:08X} undefined", app); + XELOGE("XMsgInProcessCall: app {:08X} undefined", + static_cast(app)); } return result; } @@ -37,7 +38,8 @@ dword_result_t XMsgSystemProcessCall_entry(dword_t app, dword_t message, auto result = kernel_state()->app_manager()->DispatchMessageAsync( app, message, buffer, buffer_length); if (result == X_ERROR_NOT_FOUND) { - XELOGE("XMsgSystemProcessCall: app {:08X} undefined", app); + XELOGE("XMsgSystemProcessCall: app {:08X} undefined", + static_cast(app)); } return result; } diff --git a/src/xenia/kernel/xam/xam_net.cc b/src/xenia/kernel/xam/xam_net.cc index c2de7d696..2b1d1bd70 100644 --- a/src/xenia/kernel/xam/xam_net.cc +++ b/src/xenia/kernel/xam/xam_net.cc @@ -227,7 +227,8 @@ dword_result_t NetDll_XNetGetOpt_entry(dword_t one, dword_t option_id, std::memcpy(buffer_ptr, &xnet_startup_params, sizeof(XNetStartupParams)); return 0; default: - XELOGE("NetDll_XNetGetOpt: option {} unimplemented", option_id); + XELOGE("NetDll_XNetGetOpt: option {} unimplemented", + static_cast(option_id)); return uint32_t(X_WSAError::X_WSAEINVAL); } } diff --git a/src/xenia/kernel/xam/xam_task.cc b/src/xenia/kernel/xam/xam_task.cc index 80d3408b5..4c815aad1 100644 --- a/src/xenia/kernel/xam/xam_task.cc +++ b/src/xenia/kernel/xam/xam_task.cc @@ -58,7 +58,7 @@ dword_result_t XamTaskSchedule_entry(lpvoid_t callback, auto v1 = option->value1; auto v2 = option->value2; // typically 0? - XELOGI("Got xam task args: v1 = {:08X}, v2 = {:08X}", v1, v2); + XELOGI("Got xam task args: v1 = {:08X}, v2 = {:08X}", v1.get(), v2.get()); } uint32_t stack_size = kernel_state()->GetExecutableModule()->stack_size(); diff --git a/src/xenia/kernel/xam/xam_ui.cc b/src/xenia/kernel/xam/xam_ui.cc index 33f364d49..c4edd2a70 100644 --- a/src/xenia/kernel/xam/xam_ui.cc +++ b/src/xenia/kernel/xam/xam_ui.cc @@ -781,10 +781,11 @@ dword_result_t XamShowMarketplaceUI_entry(dword_t user_index, dword_t ui_type, case 1: desc = fmt::format( "Game requested to open marketplace page for offer ID 0x{:016X}.", - offer_id); + static_cast(offer_id)); break; default: - desc = fmt::format("Unknown marketplace op {:d}", ui_type); + desc = fmt::format("Unknown marketplace op {:d}", + static_cast(ui_type)); break; } @@ -871,7 +872,7 @@ dword_result_t XamShowMarketplaceDownloadItemsUI_entry( } for (uint32_t i = 0; i < num_offers; i++) { - desc += fmt::format("\n0x{:16X}", offers[i]); + desc += fmt::format("\n0x{:16X}", offers[i].get()); } desc += diff --git a/src/xenia/kernel/xam/xam_user.cc b/src/xenia/kernel/xam/xam_user.cc index a35541140..224d35a9c 100644 --- a/src/xenia/kernel/xam/xam_user.cc +++ b/src/xenia/kernel/xam/xam_user.cc @@ -412,7 +412,7 @@ dword_result_t XamUserWriteProfileSettings_entry( "XamUserWriteProfileSettings: setting index [{}]:" " from={} setting_id={:08X} data.type={}", n, (uint32_t)setting.from, (uint32_t)setting.setting_id, - setting.data.type); + static_cast(setting.data.type)); switch (setting_type) { case X_USER_DATA_TYPE::CONTENT: @@ -445,7 +445,7 @@ dword_result_t XamUserWriteProfileSettings_entry( case X_USER_DATA_TYPE::DATETIME: default: { XELOGE("XamUserWriteProfileSettings: Unimplemented data type {}", - setting_type); + static_cast(setting_type)); } break; }; } diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_debug.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_debug.cc index 46eed8fd9..e9c2ea969 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_debug.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_debug.cc @@ -148,8 +148,10 @@ DECLARE_XBOXKRNL_EXPORT2(RtlRaiseException, kDebug, kStub, kImportant); void KeBugCheckEx_entry(dword_t code, dword_t param1, dword_t param2, dword_t param3, dword_t param4) { - XELOGD("*** STOP: 0x{:08X} (0x{:08X}, 0x{:08X}, 0x{:08X}, 0x{:08X})", code, - param1, param2, param3, param4); + XELOGD("*** STOP: 0x{:08X} (0x{:08X}, 0x{:08X}, 0x{:08X}, 0x{:08X})", + static_cast(code), static_cast(param1), + static_cast(param2), static_cast(param3), + static_cast(param4)); fflush(stdout); xe::debugging::Break(); assert_always(); diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_modules.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_modules.cc index 4dea471ca..05dc07342 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_modules.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_modules.cc @@ -229,7 +229,8 @@ dword_result_t XexGetProcedureAddress_entry(lpvoid_t hmodule, dword_t ordinal, XELOGW( "ERROR: XexGetProcedureAddress ordinal {} (0x{:X}) in '{}' not " "found!", - ordinal, ordinal, module->name()); + static_cast(ordinal), static_cast(ordinal), + module->name()); } *out_function_ptr = 0; result = X_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND; diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index ac6c201cc..fde0a13c8 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -647,8 +647,10 @@ void Memory::DumpMap() { XELOGE(" System Page Size: {0} ({0:08X})", system_page_size_); XELOGE(" System Allocation Granularity: {0} ({0:08X})", system_allocation_granularity_); - XELOGE(" Virtual Membase: {}", virtual_membase_); - XELOGE(" Physical Membase: {}", physical_membase_); + XELOGE(" Virtual Membase: {}", + static_cast(virtual_membase_)); + XELOGE(" Physical Membase: {}", + static_cast(physical_membase_)); XELOGE(""); XELOGE("------------------------------------------------------------------"); XELOGE("Virtual Heaps"); diff --git a/src/xenia/vfs/devices/disc_image_device.cc b/src/xenia/vfs/devices/disc_image_device.cc index 9e126bfde..633c40db2 100644 --- a/src/xenia/vfs/devices/disc_image_device.cc +++ b/src/xenia/vfs/devices/disc_image_device.cc @@ -41,13 +41,14 @@ bool DiscImageDevice::Initialize() { state.size = mmap_->size(); auto result = Verify(&state); if (result != Error::kSuccess) { - XELOGE("Failed to verify disc image header: {}", result); + XELOGE("Failed to verify disc image header: {}", + static_cast(result)); return false; } result = ReadAllEntries(&state, state.ptr + state.root_offset); if (result != Error::kSuccess) { - XELOGE("Failed to read all GDFX entries: {}", result); + XELOGE("Failed to read all GDFX entries: {}", static_cast(result)); return false; } diff --git a/src/xenia/vfs/devices/xcontent_container_device.cc b/src/xenia/vfs/devices/xcontent_container_device.cc index 44cf11891..3dfa68487 100644 --- a/src/xenia/vfs/devices/xcontent_container_device.cc +++ b/src/xenia/vfs/devices/xcontent_container_device.cc @@ -93,7 +93,8 @@ bool XContentContainerDevice::Initialize() { auto header_loading_result = ReadHeaderAndVerify(header_file); if (header_loading_result != Result::kSuccess) { - XELOGE("Error reading XContent header: {}", header_loading_result); + XELOGE("Error reading XContent header: {}", + static_cast(header_loading_result)); fclose(header_file); return false; } diff --git a/src/xenia/vfs/devices/xcontent_devices/stfs_container_device.cc b/src/xenia/vfs/devices/xcontent_devices/stfs_container_device.cc index f08077e20..1d9e05039 100644 --- a/src/xenia/vfs/devices/xcontent_devices/stfs_container_device.cc +++ b/src/xenia/vfs/devices/xcontent_devices/stfs_container_device.cc @@ -158,8 +158,8 @@ std::unique_ptr StfsContainerDevice::ReadEntry( XELOGW( "STFS file {} only found {} bytes for file, expected {} ({} " "bytes missing)", - name, dir_entry->length - remaining_size, dir_entry->length, - remaining_size); + name, dir_entry->length.get() - remaining_size, + dir_entry->length.get(), remaining_size); assert_always(); } diff --git a/src/xenia/vfs/devices/xcontent_devices/svod_container_device.cc b/src/xenia/vfs/devices/xcontent_devices/svod_container_device.cc index 1af0d4d6a..f1e4acda7 100644 --- a/src/xenia/vfs/devices/xcontent_devices/svod_container_device.cc +++ b/src/xenia/vfs/devices/xcontent_devices/svod_container_device.cc @@ -47,7 +47,8 @@ SvodContainerDevice::Result SvodContainerDevice::LoadHostFiles( if (fragment_files.size() != header_->content_metadata.data_file_count) { XELOGE("SVOD expecting {} data fragments, but {} are present.", - header_->content_metadata.data_file_count, fragment_files.size()); + header_->content_metadata.data_file_count.get(), + fragment_files.size()); return Result::kFileMismatch; } diff --git a/third_party/fmt b/third_party/fmt index 7bdf0628b..0c9fce2ff 160000 --- a/third_party/fmt +++ b/third_party/fmt @@ -1 +1 @@ -Subproject commit 7bdf0628b1276379886c7f6dda2cef2b3b374f0b +Subproject commit 0c9fce2ffefecfdce794e1859584e25877b7b592