mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-08 04:15:08 -04:00
Use OSGetSystemTime Extension
- Fixes desyncing issues with save file time and a couple other odd instances, particularly on mobile platforms that suspend apps
This commit is contained in:
Vendored
+1
-1
Submodule extern/aurora updated: 9087a409da...e6c3a4409c
+1
-1
@@ -118,7 +118,7 @@ static int dKyeff_Create(kankyo_class* i_this) {
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "Name") == 0) {
|
||||
camera_process_class* camera = dComIfGp_getCamera(0);
|
||||
OSTime time = OSGetTime();
|
||||
OSTime time = DUSK_IF_ELSE(OSGetSystemTime(), OSGetTime());
|
||||
OSTicksToCalendarTime(time, &calendar);
|
||||
|
||||
g_env_light.global_wind_influence.vec.x = 1.0f;
|
||||
|
||||
+1
-1
@@ -1823,7 +1823,7 @@ int dSv_info_c::memory_to_card(char* card_ptr, int dataNum) {
|
||||
savedata->getPlayer().getPlayerInfo().setTotalTime(play_time);
|
||||
}
|
||||
|
||||
savedata->getPlayer().getPlayerStatusB().setDateIpl(OSGetTime());
|
||||
savedata->getPlayer().getPlayerStatusB().setDateIpl(DUSK_IF_ELSE(OSGetSystemTime(), OSGetTime()));
|
||||
|
||||
memcpy(card_ptr, savedata, sizeof(dSv_save_c));
|
||||
card_ptr += 0x958;
|
||||
|
||||
@@ -320,7 +320,7 @@ static void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) {
|
||||
#endif
|
||||
|
||||
OSCalendarTime time;
|
||||
OSTicksToCalendarTime(OSGetTime(), &time);
|
||||
OSTicksToCalendarTime(DUSK_IF_ELSE(OSGetSystemTime(), OSGetTime()), &time);
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::version::isRegionPal()) {
|
||||
|
||||
@@ -527,7 +527,7 @@ void myExceptionCallback(u16, OSContext*, u32, u32) {
|
||||
u32 btnHold;
|
||||
u32 btnTrig;
|
||||
|
||||
mDoMain::sHungUpTime = OSGetTime();
|
||||
mDoMain::sHungUpTime = DUSK_IF_ELSE(OSGetSystemTime(), OSGetTime());
|
||||
OSReportEnable();
|
||||
cAPICPad_recalibrate();
|
||||
// "Vibration stopping & resetting to default\n"
|
||||
|
||||
@@ -770,7 +770,7 @@ int game_main(int argc, char* argv[]) {
|
||||
|
||||
OSInit();
|
||||
|
||||
mDoMain::sPowerOnTime = OSGetTime();
|
||||
mDoMain::sPowerOnTime = DUSK_IF_ELSE(OSGetSystemTime(), OSGetTime());
|
||||
|
||||
// Reset Data
|
||||
static mDoRstData sResetData = {0};
|
||||
|
||||
Reference in New Issue
Block a user