Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Source/Core/Common/Logging/Log.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ void GenericLogFmt(LogLevel level, LogType type, const char* file, int line, con
static_assert(NumFields == sizeof...(args),
"Unexpected number of replacement fields in format string; did you pass too few or "
"too many arguments?");
GenericLogFmtImpl(level, type, file, line, format, fmt::make_format_args(args...));

#if FMT_VERSION >= 110000
auto&& format_str = fmt::format_string<Args...>(format);
#else
auto&& format_str = format;
#endif
GenericLogFmtImpl(level, type, file, line, format_str, fmt::make_format_args(args...));
}
} // namespace Common::Log

Expand Down
13 changes: 10 additions & 3 deletions Source/Core/Common/MsgHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,17 @@ bool MsgAlertFmt(bool yes_no, MsgType style, Common::Log::LogType log_type, cons
static_assert(NumFields == sizeof...(args),
"Unexpected number of replacement fields in format string; did you pass too few or "
"too many arguments?");
#if FMT_VERSION >= 90000
#if FMT_VERSION >= 110000
static_assert(std::is_base_of_v<fmt::detail::compile_string, S>);
auto&& format_str = fmt::format_string<Args...>(format);
#elif FMT_VERSION >= 90000
static_assert(fmt::detail::is_compile_string<S>::value);
auto&& format_str = format;
#else
static_assert(fmt::is_compile_string<S>::value);
auto&& format_str = format;
#endif
return MsgAlertFmtImpl(yes_no, style, log_type, file, line, format,
return MsgAlertFmtImpl(yes_no, style, log_type, file, line, format_str,
fmt::make_format_args(args...));
}

Expand All @@ -60,7 +65,9 @@ bool MsgAlertFmtT(bool yes_no, MsgType style, Common::Log::LogType log_type, con
static_assert(NumFields == sizeof...(args),
"Unexpected number of replacement fields in format string; did you pass too few or "
"too many arguments?");
#if FMT_VERSION >= 90000
#if FMT_VERSION >= 110000
static_assert(std::is_base_of_v<fmt::detail::compile_string, S>);
#elif FMT_VERSION >= 90000
static_assert(fmt::detail::is_compile_string<S>::value);
#else
static_assert(fmt::is_compile_string<S>::value);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/EXI/BBA/BuiltIn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ bool CEXIETHERNET::BuiltInBBAInterface::SendFrame(const u8* frame, u32 size)
}

default:
ERROR_LOG_FMT(SP1, "Unsupported EtherType {#06x}", *ethertype);
ERROR_LOG_FMT(SP1, "Unsupported EtherType {:#06x}", *ethertype);
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/EXI/EXIBrawlback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ void CEXIBrawlback::handleEndMatch(u8* payload)

if (res != 0)
{
ERROR_LOG_FMT(BRAWLBACK, "[GameReport] Got error executing request. Err code: {#d}", (int)res);
ERROR_LOG_FMT(BRAWLBACK, "[GameReport] Got error executing request. Err code: {:d}", (int)res);
}
else
{
Expand Down