Warn the user if the desktop display refresh rate is set too low.

Thanks to Arethien on Discord for highlighting this problem.
This commit is contained in:
Henrik Rydgård
2025-08-21 10:30:33 +02:00
parent b89e5e3c80
commit 474a5a1329
51 changed files with 83 additions and 6 deletions
+9 -1
View File
@@ -71,6 +71,7 @@
#include "UI/DevScreens.h"
#include "UI/MainScreen.h"
#include "UI/EmuScreen.h"
#include "UI/OnScreenDisplay.h"
#include "UI/ControlMappingScreen.h"
#include "UI/DeveloperToolsScreen.h"
#include "UI/JitCompareScreen.h"
@@ -704,7 +705,14 @@ void SystemInfoScreen::CreateDeviceInfoTab(UI::LinearLayout *deviceSpecs) {
}
// Don't show on Windows, since it's always treated as 60 there.
displayInfo->Add(new InfoItem(si->T("Refresh rate"), StringFromFormat(si->T_cstr("%0.2f Hz"), (float)System_GetPropertyFloat(SYSPROP_DISPLAY_REFRESH_RATE))));
const double displayHz = System_GetPropertyFloat(SYSPROP_DISPLAY_REFRESH_RATE);
displayInfo->Add(new InfoItem(si->T("Refresh rate"), StringFromFormat(si->T_cstr("%0.2f Hz"), displayHz)));
if (displayHz < 55.0f) {
displayInfo->Add(new NoticeView(NoticeLevel::WARN, ApplySafeSubstitutions(gr->T("Your display is set to a low refresh rate: %1 Hz. 60 Hz or higher is recommended."), (int)displayHz), ""));
}
std::string presentModes;
if (draw->GetDeviceCaps().presentModesSupported & Draw::PresentMode::FIFO) presentModes += "FIFO, ";
if (draw->GetDeviceCaps().presentModesSupported & Draw::PresentMode::IMMEDIATE) presentModes += "IMMEDIATE, ";