Merge pull request #12852 from LillyJadeKatrin/retroachievements-speed-limit-fix

Remove Extra Speed Limit Message
This commit is contained in:
JMC47 2024-06-14 15:38:45 -04:00 committed by GitHub
commit 4502b60f71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 3 deletions

View File

@ -472,9 +472,14 @@ void HotkeyScheduler::Run()
auto ShowEmulationSpeed = []() {
const float emulation_speed = Config::Get(Config::MAIN_EMULATION_SPEED);
OSD::AddMessage(emulation_speed <= 0 ?
"Speed Limit: Unlimited" :
fmt::format("Speed Limit: {}%", std::lround(emulation_speed * 100.f)));
if (!AchievementManager::GetInstance().IsHardcoreModeActive() ||
Config::Get(Config::MAIN_EMULATION_SPEED) >= 1.0f ||
Config::Get(Config::MAIN_EMULATION_SPEED) <= 0.0f)
{
OSD::AddMessage(emulation_speed <= 0 ? "Speed Limit: Unlimited" :
fmt::format("Speed Limit: {}%",
std::lround(emulation_speed * 100.f)));
}
};
if (IsHotkey(HK_DECREASE_EMULATION_SPEED))