From e4915fb7d2077584a11a15141bc81d28ed2b0125 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Sun, 29 Oct 2023 13:50:55 +0000 Subject: Rework time service to fix time passing offline. --- .../hle/service/set/setting_formats/private_settings.h | 1 - .../hle/service/set/setting_formats/system_settings.cpp | 2 +- .../hle/service/set/setting_formats/system_settings.h | 16 ++++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src/core/hle/service/set/setting_formats') diff --git a/src/core/hle/service/set/setting_formats/private_settings.h b/src/core/hle/service/set/setting_formats/private_settings.h index 6c40f62e1..6579e95e0 100644 --- a/src/core/hle/service/set/setting_formats/private_settings.h +++ b/src/core/hle/service/set/setting_formats/private_settings.h @@ -8,7 +8,6 @@ #include "common/common_types.h" #include "common/uuid.h" #include "core/hle/service/set/settings_types.h" -#include "core/hle/service/time/clock_types.h" namespace Service::Set { diff --git a/src/core/hle/service/set/setting_formats/system_settings.cpp b/src/core/hle/service/set/setting_formats/system_settings.cpp index 66e57651e..ec00b90a6 100644 --- a/src/core/hle/service/set/setting_formats/system_settings.cpp +++ b/src/core/hle/service/set/setting_formats/system_settings.cpp @@ -45,7 +45,7 @@ SystemSettings DefaultSystemSettings() { }; settings.device_time_zone_location_name = {"UTC"}; - settings.user_system_clock_automatic_correction_enabled = false; + settings.user_system_clock_automatic_correction_enabled = true; settings.primary_album_storage = PrimaryAlbumStorage::SdCard; settings.battery_percentage_flag = true; diff --git a/src/core/hle/service/set/setting_formats/system_settings.h b/src/core/hle/service/set/setting_formats/system_settings.h index 14654f8b1..af5929fa9 100644 --- a/src/core/hle/service/set/setting_formats/system_settings.h +++ b/src/core/hle/service/set/setting_formats/system_settings.h @@ -12,7 +12,6 @@ #include "common/vector_math.h" #include "core/hle/service/set/setting_formats/private_settings.h" #include "core/hle/service/set/settings_types.h" -#include "core/hle/service/time/clock_types.h" namespace Service::Set { @@ -197,12 +196,14 @@ struct SystemSettings { std::array backlight_settings_mixed_up; INSERT_PADDING_BYTES(0x64); // Reserved - Service::Time::Clock::SystemClockContext user_system_clock_context; - Service::Time::Clock::SystemClockContext network_system_clock_context; + // nn::time::SystemClockContext + Service::PSC::Time::SystemClockContext user_system_clock_context; + Service::PSC::Time::SystemClockContext network_system_clock_context; bool user_system_clock_automatic_correction_enabled; INSERT_PADDING_BYTES(0x3); INSERT_PADDING_BYTES(0x4); // Reserved - Service::Time::Clock::SteadyClockTimePoint + // nn::time::SteadyClockTimePoint + Service::PSC::Time::SteadyClockTimePoint user_system_clock_automatic_correction_updated_time_point; INSERT_PADDING_BYTES(0x10); // Reserved @@ -280,9 +281,12 @@ struct SystemSettings { bool requires_run_repair_time_reviser; INSERT_PADDING_BYTES(0x6B); // Reserved - Service::Time::TimeZone::LocationName device_time_zone_location_name; + // nn::time::LocationName + Service::PSC::Time::LocationName device_time_zone_location_name; INSERT_PADDING_BYTES(0x4); // Reserved - Service::Time::Clock::SteadyClockTimePoint device_time_zone_location_updated_time; + // nn::time::SteadyClockTimePoint + Service::PSC::Time::SteadyClockTimePoint device_time_zone_location_updated_time; + INSERT_PADDING_BYTES(0xC0); // Reserved // nn::settings::system::PrimaryAlbumStorage -- cgit v1.2.3