@@ -51,7 +51,10 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* settings_dialog
5151 m_ui.rtcDateTime ->setDateRange (QDate (2000 , 1 , 1 ), QDate (2099 , 12 , 31 ));
5252 SettingWidgetBinder::BindWidgetToBoolSetting (sif, m_ui.manuallySetRealTimeClock , " EmuCore" , " ManuallySetRealTimeClock" , false );
5353 connect (m_ui.manuallySetRealTimeClock , &QCheckBox::checkStateChanged, this , &EmulationSettingsWidget::onManuallySetRealTimeClockChanged);
54+ SettingWidgetBinder::BindWidgetToBoolSetting (sif, m_ui.rtcUseSystemLocaleFormat , " EmuCore" , " UseSystemLocaleFormat" , false );
55+ connect (m_ui.rtcUseSystemLocaleFormat , &QCheckBox::checkStateChanged, this , &EmulationSettingsWidget::onUseSystemLocaleFormatChanged);
5456 EmulationSettingsWidget::onManuallySetRealTimeClockChanged ();
57+ EmulationSettingsWidget::onUseSystemLocaleFormatChanged ();
5558
5659 m_ui.eeCycleRate ->insertItem (0 ,
5760 tr (" Use Global Setting [%1]" )
@@ -159,10 +162,12 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* settings_dialog
159162 dialog ()->registerWidgetHelp (m_ui.manuallySetRealTimeClock , tr (" Manually Set Real-Time Clock" ), tr (" Unchecked" ),
160163 tr (" Manually set a real-time clock to use for the virtual PlayStation 2 instead of using your OS' system clock." ));
161164 dialog ()->registerWidgetHelp (m_ui.rtcDateTime , tr (" Real-Time Clock" ), tr (" Current date and time" ),
162- tr (" Real-time clock (RTC) used by the virtual PlayStation 2. Date format is the same as the one used by your OS. "
163- " This time is only applied upon booting the PS2; changing it while in-game will have no effect. "
164- " NOTE: This assumes you have your PS2 set to the default timezone of GMT+0 and default DST of Summer Time. "
165+ tr (" Real-time clock (RTC) used by the virtual PlayStation 2.<br> "
166+ " This time is only applied upon booting the PS2; changing it while in-game will have no effect.<br> "
167+ " NOTE: This assumes you have your PS2 set to the default timezone of GMT+0 and default DST of Summer Time.<br> "
165168 " Some games require an RTC date/time set after their release date." ));
169+ dialog ()->registerWidgetHelp (m_ui.rtcUseSystemLocaleFormat , tr (" Use System Locale Format" ), tr (" User Preference" ),
170+ tr (" Uses the operating system's date/time format rather than \" yyyy-mm-dd hh:mm:ss\" . May exclude seconds." ));
166171
167172 updateOptimalFramePacing ();
168173 updateUseVSyncForTimingEnabled ();
@@ -314,4 +319,11 @@ void EmulationSettingsWidget::onManuallySetRealTimeClockChanged()
314319{
315320 const bool enabled = dialog ()->getEffectiveBoolValue (" EmuCore" , " ManuallySetRealTimeClock" , false );
316321 m_ui.rtcDateTime ->setEnabled (enabled);
322+ m_ui.rtcUseSystemLocaleFormat ->setEnabled (enabled);
323+ }
324+
325+ void EmulationSettingsWidget::onUseSystemLocaleFormatChanged ()
326+ {
327+ const bool enabled = dialog ()->getEffectiveBoolValue (" EmuCore" , " UseSystemLocaleFormat" , false );
328+ m_ui.rtcDateTime ->setDisplayFormat (enabled ? QLocale::system ().dateTimeFormat (QLocale::ShortFormat) : " yyyy-MM-dd HH:mm:ss" );
317329}
0 commit comments