diff --git a/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp b/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp index e5a65ffb93..13b77eb1ad 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp +++ b/Source/Core/Core/IOS/USB/Bluetooth/WiimoteDevice.cpp @@ -212,13 +212,12 @@ bool WiimoteDevice::IsConnected() const void WiimoteDevice::Activate(bool connect) { - const char* message = nullptr; - if (connect && m_baseband_state == BasebandState::Inactive) { SetBasebandState(BasebandState::RequestConnection); - message = "Wii Remote {} connected"; + Core::DisplayMessage(fmt::format("Wii Remote {} connected", GetNumber() + 1), + CONNECTION_MESSAGE_TIME); } else if (!connect && IsConnected()) { @@ -228,11 +227,9 @@ void WiimoteDevice::Activate(bool connect) // Not doing that doesn't seem to break anything. m_host->RemoteDisconnect(GetBD()); - message = "Wii Remote {} disconnected"; + Core::DisplayMessage(fmt::format("Wii Remote {} disconnected", GetNumber() + 1), + CONNECTION_MESSAGE_TIME); } - - if (message) - Core::DisplayMessage(fmt::format(message, GetNumber() + 1), CONNECTION_MESSAGE_TIME); } bool WiimoteDevice::EventConnectionRequest() diff --git a/Source/Core/DiscIO/DiscUtils.cpp b/Source/Core/DiscIO/DiscUtils.cpp index 002ce066db..cdfcb015c4 100644 --- a/Source/Core/DiscIO/DiscUtils.cpp +++ b/Source/Core/DiscIO/DiscUtils.cpp @@ -45,7 +45,7 @@ std::string NameForPartitionType(u32 partition_type, bool include_prefix) return include_prefix ? "P-" + type_as_game_id : type_as_game_id; } - return fmt::format(include_prefix ? "P{}" : "{}", partition_type); + return fmt::format("{}{}", include_prefix ? "P" : "", partition_type); } } diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h index 14a6935cbe..0d21166094 100644 --- a/Source/Core/VideoCommon/BPMemory.h +++ b/Source/Core/VideoCommon/BPMemory.h @@ -565,9 +565,9 @@ struct fmt::formatter if (has_bias) { if (has_ac || has_bc || has_d) - out = fmt::format_to(out, cc.bias == TevBias::AddHalf ? " + .5" : " - .5"); + out = fmt::format_to(out, "{}", cc.bias == TevBias::AddHalf ? " + .5" : " - .5"); else - out = fmt::format_to(out, cc.bias == TevBias::AddHalf ? ".5" : "-.5"); + out = fmt::format_to(out, "{}", cc.bias == TevBias::AddHalf ? ".5" : "-.5"); } else { @@ -659,9 +659,9 @@ struct fmt::formatter if (has_bias) { if (has_ac || has_bc || has_d) - out = fmt::format_to(out, ac.bias == TevBias::AddHalf ? " + .5" : " - .5"); + out = fmt::format_to(out, "{}", ac.bias == TevBias::AddHalf ? " + .5" : " - .5"); else - out = fmt::format_to(out, ac.bias == TevBias::AddHalf ? ".5" : "-.5"); + out = fmt::format_to(out, "{}", ac.bias == TevBias::AddHalf ? ".5" : "-.5"); } else { diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 8aaba2e4e0..673c97ec9b 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -5,6 +5,7 @@ #include #include +#include #include "Common/Assert.h" #include "Common/CommonTypes.h" @@ -1819,7 +1820,7 @@ static void WriteAlphaTest(ShaderCode& out, const pixel_shader_uid_data* uid_dat if (has_no_arguments) out.Write("{}", tev_alpha_funcs_table[mode]); else - out.Write(tev_alpha_funcs_table[mode], ref); + out.Write(fmt::runtime(tev_alpha_funcs_table[mode]), ref); }; out.SetConstantsUsed(C_ALPHA, C_ALPHA); diff --git a/Source/Core/VideoCommon/XFStructs.cpp b/Source/Core/VideoCommon/XFStructs.cpp index be565c6de0..33e148d043 100644 --- a/Source/Core/VideoCommon/XFStructs.cpp +++ b/Source/Core/VideoCommon/XFStructs.cpp @@ -594,7 +594,7 @@ std::pair GetXFTransferInfo(u16 base_address, u8 trans for (u32 i = 0; i < xf_mem_transfer_size; i++) { const auto mem_desc = GetXFMemDescription(xf_mem_base + i, Common::swap32(data)); - fmt::format_to(std::back_inserter(desc), i == 0 ? "{}" : "\n{}", mem_desc); + fmt::format_to(std::back_inserter(desc), "{}{}", i != 0 ? "\n" : "", mem_desc); data += 4; }