RTC: Write 0 tot he counter bias if we are on custom RTC
This can be considered a hack, but it essentially neuter the bias applied on boot for both console on the RTC. This avoids having the time on boot be changes significantly while the user would want a specific RTC and it also avoids possible underflow of the RTC if it is near the epoch.
This commit is contained in:
parent
e1866d35e5
commit
4b2906c569
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "Core/Config/SYSCONFSettings.h"
|
||||
#include "Core/ConfigLoaders/IsSettingSaveable.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/IOS/IOS.h"
|
||||
#include "Core/IOS/USB/Bluetooth/BTBase.h"
|
||||
|
@ -49,6 +50,9 @@ void SaveToSYSCONF(Config::LayerType layer)
|
|||
setting.config_info);
|
||||
}
|
||||
|
||||
if (SConfig::GetInstance().bEnableCustomRTC)
|
||||
sysconf.SetData<u32>("IPL.CB", SysConf::Entry::Type::Long, 0);
|
||||
|
||||
// Disable WiiConnect24's standby mode. If it is enabled, it prevents us from receiving
|
||||
// shutdown commands in the State Transition Manager (STM).
|
||||
// TODO: remove this if and once Dolphin supports WC24 standby mode.
|
||||
|
@ -177,4 +181,4 @@ std::unique_ptr<Config::ConfigLayerLoader> GenerateBaseConfigLoader()
|
|||
{
|
||||
return std::make_unique<BaseConfigLayerLoader>();
|
||||
}
|
||||
}
|
||||
} // namespace ConfigLoaders
|
||||
|
|
|
@ -129,6 +129,8 @@ CEXIIPL::CEXIIPL() : m_uPosition(0), m_uAddress(0), m_uRWOffset(0), m_FontsLoade
|
|||
// We Overwrite language selection here since it's possible on the GC to change the language as
|
||||
// you please
|
||||
g_SRAM.lang = SConfig::GetInstance().SelectedLanguage;
|
||||
if (SConfig::GetInstance().bEnableCustomRTC)
|
||||
g_SRAM.counter_bias = 0;
|
||||
FixSRAMChecksums();
|
||||
|
||||
Common::WriteProtectMemory(m_pIPL, ROM_SIZE);
|
||||
|
|
Loading…
Reference in New Issue