From 263df1ea177c8e604415b72dfe80e7f70503cbaf Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Fri, 24 Jun 2022 03:36:25 +0200 Subject: [PATCH] Remove settings display_show_fps - frontend can do this --- src/core/settings.cpp | 2 -- src/core/settings.h | 1 - src/libretro/libretro_host_interface.cpp | 27 ------------------------ 3 files changed, 30 deletions(-) diff --git a/src/core/settings.cpp b/src/core/settings.cpp index ace78ba1..83be07e2 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -235,7 +235,6 @@ void Settings::Load(SettingsInterface& si) display_stretch = si.GetBoolValue("Display", "Stretch", false); display_post_processing = si.GetBoolValue("Display", "PostProcessing", false); display_show_osd_messages = si.GetBoolValue("Display", "ShowOSDMessages", true); - display_show_fps = si.GetBoolValue("Display", "ShowFPS", false); display_show_vps = si.GetBoolValue("Display", "ShowVPS", false); display_show_speed = si.GetBoolValue("Display", "ShowSpeed", false); display_show_resolution = si.GetBoolValue("Display", "ShowResolution", false); @@ -412,7 +411,6 @@ void Settings::Save(SettingsInterface& si) const si.SetBoolValue("Display", "Stretch", display_stretch); si.SetBoolValue("Display", "PostProcessing", display_post_processing); si.SetBoolValue("Display", "ShowOSDMessages", display_show_osd_messages); - si.SetBoolValue("Display", "ShowFPS", display_show_fps); si.SetBoolValue("Display", "ShowVPS", display_show_vps); si.SetBoolValue("Display", "ShowSpeed", display_show_speed); si.SetBoolValue("Display", "ShowResolution", display_show_resolution); diff --git a/src/core/settings.h b/src/core/settings.h index 7ecbe145..0e085f1b 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -144,7 +144,6 @@ struct Settings bool display_stretch = false; bool display_post_processing = false; bool display_show_osd_messages = true; - bool display_show_fps = false; bool display_show_vps = false; bool display_show_speed = false; bool display_show_resolution = false; diff --git a/src/libretro/libretro_host_interface.cpp b/src/libretro/libretro_host_interface.cpp index a9ce6925..e8a86ed2 100644 --- a/src/libretro/libretro_host_interface.cpp +++ b/src/libretro/libretro_host_interface.cpp @@ -566,33 +566,6 @@ void LibretroHostInterface::retro_run_frame() auto* const audio_stream = dynamic_cast(m_audio_stream.get()); DebugAssert(audio_stream); audio_stream->UploadToFrontend(); - - if (libretro_msg_interface_version >= 1) - { - if (g_settings.display_show_fps) - { - frame_count++; - if (frame_count % 64 == 0) - { - System::UpdatePerformanceCounters(); - char message_buffer[64]; - message_buffer[0] = '\0'; - float internal_fps = (System::GetFPS() * System::GetThrottleFrequency()) / System::GetVPS(); - snprintf(message_buffer, sizeof(message_buffer), "Internal FPS: %.2f", internal_fps); - const char * fps_message = message_buffer; - retro_message_ext ifps = {}; - ifps.msg = fps_message; - ifps.duration = 3000; - ifps.priority = 1; - ifps.level = RETRO_LOG_INFO; - ifps.target = RETRO_MESSAGE_TARGET_OSD; - ifps.type = RETRO_MESSAGE_TYPE_STATUS; - ifps.progress = -1; - g_retro_environment_callback(RETRO_ENVIRONMENT_SET_MESSAGE_EXT, &ifps); - frame_count = 0; - } - } - } } unsigned LibretroHostInterface::retro_get_region()