From 3fa12d43f584b9b0d5ec473f151d3725d1310ad1 Mon Sep 17 00:00:00 2001 From: xperia64 Date: Sun, 22 Nov 2020 20:55:45 -0500 Subject: [PATCH] Fix fmt crash from deprecated percent specifier (#5616) * Fix fmt crash from deprecated percent specifier * ...clang format --- src/citra/emu_window/emu_window_sdl2.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index f8fc2b3a1c..f3d4c5d043 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp @@ -289,9 +289,10 @@ void EmuWindow_SDL2::PollEvents() { const u32 current_time = SDL_GetTicks(); if (current_time > last_time + 2000) { const auto results = Core::System::GetInstance().GetAndResetPerfStats(); - const auto title = fmt::format( - "Citra {} | {}-{} | FPS: {:.0f} ({:.0%})", Common::g_build_fullname, - Common::g_scm_branch, Common::g_scm_desc, results.game_fps, results.emulation_speed); + const auto title = + fmt::format("Citra {} | {}-{} | FPS: {:.0f} ({:.0f}%)", Common::g_build_fullname, + Common::g_scm_branch, Common::g_scm_desc, results.game_fps, + results.emulation_speed * 100.0f); SDL_SetWindowTitle(render_window, title.c_str()); last_time = current_time; }