mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Add support for fmt 11 (#1366)
This commit is contained in:
committed by
SSimco
parent
669fb5533d
commit
6016f2e298
@@ -92,7 +92,11 @@ bool cemuLog_log(LogType type, std::basic_string<T> formatStr, TArgs&&... args)
|
||||
else
|
||||
{
|
||||
const auto format_view = fmt::basic_string_view<T>(formatStr);
|
||||
#if FMT_VERSION >= 110000
|
||||
const auto text = fmt::vformat(format_view, fmt::make_format_args<fmt::buffered_context<T>>(args...));
|
||||
#else
|
||||
const auto text = fmt::vformat(format_view, fmt::make_format_args<fmt::buffer_context<T>>(args...));
|
||||
#endif
|
||||
cemuLog_log(type, std::basic_string_view(text.data(), text.size()));
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -191,7 +191,7 @@ ENABLE_ENUM_ITERATORS(CrashDump, CrashDump::Disabled, CrashDump::Enabled);
|
||||
template <>
|
||||
struct fmt::formatter<PrecompiledShaderOption> : formatter<string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(const PrecompiledShaderOption c, FormatContext &ctx) {
|
||||
auto format(const PrecompiledShaderOption c, FormatContext &ctx) const {
|
||||
string_view name;
|
||||
switch (c)
|
||||
{
|
||||
@@ -206,7 +206,7 @@ struct fmt::formatter<PrecompiledShaderOption> : formatter<string_view> {
|
||||
template <>
|
||||
struct fmt::formatter<AccurateShaderMulOption> : formatter<string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(const AccurateShaderMulOption c, FormatContext &ctx) {
|
||||
auto format(const AccurateShaderMulOption c, FormatContext &ctx) const {
|
||||
string_view name;
|
||||
switch (c)
|
||||
{
|
||||
@@ -220,7 +220,7 @@ struct fmt::formatter<AccurateShaderMulOption> : formatter<string_view> {
|
||||
template <>
|
||||
struct fmt::formatter<CPUMode> : formatter<string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(const CPUMode c, FormatContext &ctx) {
|
||||
auto format(const CPUMode c, FormatContext &ctx) const {
|
||||
string_view name;
|
||||
switch (c)
|
||||
{
|
||||
@@ -237,7 +237,7 @@ struct fmt::formatter<CPUMode> : formatter<string_view> {
|
||||
template <>
|
||||
struct fmt::formatter<CPUModeLegacy> : formatter<string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(const CPUModeLegacy c, FormatContext &ctx) {
|
||||
auto format(const CPUModeLegacy c, FormatContext &ctx) const {
|
||||
string_view name;
|
||||
switch (c)
|
||||
{
|
||||
@@ -254,7 +254,7 @@ struct fmt::formatter<CPUModeLegacy> : formatter<string_view> {
|
||||
template <>
|
||||
struct fmt::formatter<CafeConsoleRegion> : formatter<string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(const CafeConsoleRegion v, FormatContext &ctx) {
|
||||
auto format(const CafeConsoleRegion v, FormatContext &ctx) const {
|
||||
string_view name;
|
||||
switch (v)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ template <>
|
||||
struct fmt::formatter<wxString> : formatter<string_view>
|
||||
{
|
||||
template <typename FormatContext>
|
||||
auto format(const wxString& str, FormatContext& ctx)
|
||||
auto format(const wxString& str, FormatContext& ctx) const
|
||||
{
|
||||
return formatter<string_view>::format(str.c_str().AsChar(), ctx);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ using EmulatedControllerPtr = std::shared_ptr<EmulatedController>;
|
||||
template <>
|
||||
struct fmt::formatter<EmulatedController::Type> : formatter<string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(EmulatedController::Type v, FormatContext& ctx) {
|
||||
auto format(EmulatedController::Type v, FormatContext& ctx) const {
|
||||
switch (v)
|
||||
{
|
||||
case EmulatedController::Type::VPAD: return formatter<string_view>::format("Wii U Gamepad", ctx);
|
||||
|
||||
Reference in New Issue
Block a user