feat: add system time offset setting (#6139)

* Add setting for system time offset

Add a setting to displace citra system time by days, hours, minutes
or seconds
Add UI for the setting which is only visible when clock is set to
system time
Change core/settings.h to include the setting

* Add system time offset to kernel

Actually makes use of the time offset.

* Fix time offset calculatioon in core/movie.cpp

* Replace C++20 chrono::days with seconds

Hopefully fixes the build.
This commit is contained in:
DaemonTsun
2022-11-20 16:34:53 +01:00
committed by GitHub
parent 3b6ffd9c27
commit 64062162c6
7 changed files with 138 additions and 11 deletions

View File

@ -258,6 +258,44 @@
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QDateTimeEdit" name="edit_init_time">
<property name="displayFormat">
<string>yyyy-MM-ddTHH:mm:ss</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_init_time_offset">
<property name="text">
<string>Offset time</string>
</property>
</widget>
</item>
<item row="8" column="1">
<layout class="QGridLayout" name="edit_init_time_offset_grid">
<item column="0">
<widget class="QSpinBox" name="edit_init_time_offset_days">
<property name="suffix">
<string> days</string>
</property>
<property name="minimum">
<number>-2147483648</number>
</property>
<property name="maximum">
<number>2147483647</number>
</property>
</widget>
</item>
<item column="1">
<widget class="QTimeEdit" name="edit_init_time_offset_time">
<property name="displayFormat">
<string>HH:mm:ss</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="1">
<widget class="QSpinBox" name="spinBox_play_coins">
<property name="maximum">
@ -295,13 +333,6 @@
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QDateTimeEdit" name="edit_init_time">
<property name="displayFormat">
<string>yyyy-MM-ddTHH:mm:ss</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="toggle_new_3ds">
<property name="text">