Disable slowdown in hardcore mode
Slowing down the emulator would artificially improve reaction times and is therefore disallowed in hardcore mode. Speeds faster than 1x are allowed, but any speed below 1x is scaled back up to 1x.
This commit is contained in:
parent
45105822f3
commit
c20258d782
|
@ -16,13 +16,16 @@
|
|||
#include "Common/Logging/Log.h"
|
||||
#include "Common/SPSCQueue.h"
|
||||
|
||||
#include "Core/AchievementManager.h"
|
||||
#include "Core/CPUThreadConfigCallback.h"
|
||||
#include "Core/Config/AchievementSettings.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#include "VideoCommon/Fifo.h"
|
||||
#include "VideoCommon/OnScreenDisplay.h"
|
||||
#include "VideoCommon/PerformanceMetrics.h"
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
@ -135,6 +138,17 @@ void CoreTimingManager::RefreshConfig()
|
|||
|
||||
m_max_variance = std::chrono::duration_cast<DT>(DT_ms(Config::Get(Config::MAIN_TIMING_VARIANCE)));
|
||||
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
if (AchievementManager::GetInstance()->IsHardcoreModeActive() &&
|
||||
Config::Get(Config::MAIN_EMULATION_SPEED) < 1.0f &&
|
||||
Config::Get(Config::MAIN_EMULATION_SPEED) > 0.0f)
|
||||
{
|
||||
Config::SetCurrent(Config::MAIN_EMULATION_SPEED, 1.0f);
|
||||
m_emulation_speed = 1.0f;
|
||||
OSD::AddMessage("Minimum speed is 100% in Hardcore Mode");
|
||||
}
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
|
||||
m_emulation_speed = Config::Get(Config::MAIN_EMULATION_SPEED);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue