mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
Added Hardcore flag to Achievement Settings
Hardcore Mode is a RetroAchievements feature for enabling as close to original hardware as possible, to keep a fair, challenging, and competitive playing field for achievements (which get tallied differently and emphasized more in hardcore) and leaderboards (where it is mandatory) at the cost of several common emulator features that provide advantages, such as state loading and slower emulation speeds. This commit just adds the flag to the AchievementSettings, with more to come.
This commit is contained in:
@ -633,6 +633,18 @@ std::recursive_mutex* AchievementManager::GetLock()
|
||||
return &m_lock;
|
||||
}
|
||||
|
||||
bool AchievementManager::IsHardcoreModeActive() const
|
||||
{
|
||||
std::lock_guard lg{m_lock};
|
||||
if (!Config::Get(Config::RA_HARDCORE_ENABLED))
|
||||
return false;
|
||||
if (!Core::IsRunning())
|
||||
return true;
|
||||
if (!IsGameLoaded())
|
||||
return false;
|
||||
return (m_runtime.trigger_count + m_runtime.lboard_count > 0);
|
||||
}
|
||||
|
||||
std::string AchievementManager::GetPlayerDisplayName() const
|
||||
{
|
||||
return IsLoggedIn() ? m_display_name : "";
|
||||
|
Reference in New Issue
Block a user