@ -230,6 +230,8 @@ ConfigureSystem::ConfigureSystem(Core::System& system_, QWidget* parent)
& ConfigureSystem : : UpdateBirthdayComboBox ) ;
connect ( ui - > combo_init_clock , qOverload < int > ( & QComboBox : : currentIndexChanged ) , this ,
& ConfigureSystem : : UpdateInitTime ) ;
connect ( ui - > combo_init_ticks_type , qOverload < int > ( & QComboBox : : currentIndexChanged ) , this ,
& ConfigureSystem : : UpdateInitTicks ) ;
connect ( ui - > button_regenerate_console_id , & QPushButton : : clicked , this ,
& ConfigureSystem : : RefreshConsoleID ) ;
connect ( ui - > button_start_download , & QPushButton : : clicked , this ,
@ -293,6 +295,11 @@ void ConfigureSystem::SetConfiguration() {
QTime time = QTime : : fromMSecsSinceStartOfDay ( static_cast < int > ( time_offset * 1000 ) ) ;
ui - > edit_init_time_offset_time - > setTime ( time ) ;
ui - > combo_init_ticks_type - > setCurrentIndex (
static_cast < u8 > ( Settings : : values . init_ticks_type . GetValue ( ) ) ) ;
ui - > edit_init_ticks_value - > setText (
QString : : number ( Settings : : values . init_ticks_override . GetValue ( ) ) ) ;
cfg = Service : : CFG : : GetModule ( system ) ;
ReadSystemSettings ( ) ;
@ -413,6 +420,11 @@ void ConfigureSystem::ApplyConfiguration() {
static_cast < Settings : : InitClock > ( ui - > combo_init_clock - > currentIndex ( ) ) ;
Settings : : values . init_time = ui - > edit_init_time - > dateTime ( ) . toSecsSinceEpoch ( ) ;
Settings : : values . init_ticks_type =
static_cast < Settings : : InitTicks > ( ui - > combo_init_ticks_type - > currentIndex ( ) ) ;
Settings : : values . init_ticks_override =
static_cast < s64 > ( ui - > edit_init_ticks_value - > text ( ) . toLongLong ( ) ) ;
s64 time_offset_time = ui - > edit_init_time_offset_time - > time ( ) . msecsSinceStartOfDay ( ) / 1000 ;
s64 time_offset_days = ui - > edit_init_time_offset_days - > value ( ) * 86400 ;
@ -462,6 +474,7 @@ void ConfigureSystem::ConfigureTime() {
SetConfiguration ( ) ;
UpdateInitTime ( ui - > combo_init_clock - > currentIndex ( ) ) ;
UpdateInitTicks ( ui - > combo_init_ticks_type - > currentIndex ( ) ) ;
}
void ConfigureSystem : : UpdateInitTime ( int init_clock ) {
@ -477,6 +490,15 @@ void ConfigureSystem::UpdateInitTime(int init_clock) {
ui - > edit_init_time_offset_time - > setVisible ( ! is_fixed_time & & is_global ) ;
}
void ConfigureSystem : : UpdateInitTicks ( int init_ticks_type ) {
const bool is_global = Settings : : IsConfiguringGlobal ( ) ;
const bool is_fixed =
static_cast < Settings : : InitTicks > ( init_ticks_type ) = = Settings : : InitTicks : : Fixed ;
ui - > label_init_ticks_value - > setVisible ( is_fixed & & is_global ) ;
ui - > edit_init_ticks_value - > setVisible ( is_fixed & & is_global ) ;
}
void ConfigureSystem : : RefreshConsoleID ( ) {
QMessageBox : : StandardButton reply ;
QString warning_text = tr ( " This will replace your current virtual 3DS with a new one. "
@ -512,6 +534,8 @@ void ConfigureSystem::SetupPerGameUI() {
ui - > label_birthday - > setVisible ( false ) ;
ui - > label_init_clock - > setVisible ( false ) ;
ui - > label_init_time - > setVisible ( false ) ;
ui - > label_init_ticks_type - > setVisible ( false ) ;
ui - > label_init_ticks_value - > setVisible ( false ) ;
ui - > label_console_id - > setVisible ( false ) ;
ui - > label_sound - > setVisible ( false ) ;
ui - > label_language - > setVisible ( false ) ;
@ -522,12 +546,14 @@ void ConfigureSystem::SetupPerGameUI() {
ui - > combo_birthday - > setVisible ( false ) ;
ui - > combo_birthmonth - > setVisible ( false ) ;
ui - > combo_init_clock - > setVisible ( false ) ;
ui - > combo_init_ticks_type - > setVisible ( false ) ;
ui - > combo_sound - > setVisible ( false ) ;
ui - > combo_language - > setVisible ( false ) ;
ui - > combo_country - > setVisible ( false ) ;
ui - > label_init_time_offset - > setVisible ( false ) ;
ui - > edit_init_time_offset_days - > setVisible ( false ) ;
ui - > edit_init_time_offset_time - > setVisible ( false ) ;
ui - > edit_init_ticks_value - > setVisible ( false ) ;
ui - > toggle_system_setup - > setVisible ( false ) ;
ui - > button_regenerate_console_id - > setVisible ( false ) ;
// Apps can change the state of the plugin loader, so plugins load