From b79bdb13c05b4fcef23cd30b210d40662d28373b Mon Sep 17 00:00:00 2001
From: Ferdinand Bachmann <ferdinand.bachmann@yrlf.at>
Date: Sat, 4 Jan 2025 18:46:04 +0100
Subject: [PATCH] Common: Fix compile failure with fmt>=11

Index: Source/Core/Common/MsgHandler.h
--- Source/Core/Common/MsgHandler.h.orig
+++ Source/Core/Common/MsgHandler.h
@@ -41,12 +41,17 @@ bool MsgAlertFmt(bool yes_no, MsgType style, Common::L
   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...));
 }
 
@@ -60,7 +65,9 @@ bool MsgAlertFmtT(bool yes_no, MsgType style, Common::
   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);
