mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Add "Steps per hour" system setting (#211)
* Implements a steps per hour (global) setting that gets returned by PTM GetStepHistory * Make setting label text clearer * Add setting to SDL frontend * Add setting to Android (no UI) * Remove IntSetting enum value * Follow convension in android default ini
This commit is contained in:
		
							parent
							
								
									8538a57be0
								
							
						
					
					
						commit
						e1ff3b8dbe
					
				
					 9 changed files with 42 additions and 9 deletions
				
			
		|  | @ -713,6 +713,7 @@ void Config::ReadSystemValues() { | |||
|         ReadBasicSetting(Settings::values.init_time_offset); | ||||
|         ReadBasicSetting(Settings::values.init_ticks_type); | ||||
|         ReadBasicSetting(Settings::values.init_ticks_override); | ||||
|         ReadBasicSetting(Settings::values.steps_per_hour); | ||||
|         ReadBasicSetting(Settings::values.plugin_loader_enabled); | ||||
|         ReadBasicSetting(Settings::values.allow_plugin_loader); | ||||
|     } | ||||
|  | @ -1219,6 +1220,7 @@ void Config::SaveSystemValues() { | |||
|         WriteBasicSetting(Settings::values.init_time_offset); | ||||
|         WriteBasicSetting(Settings::values.init_ticks_type); | ||||
|         WriteBasicSetting(Settings::values.init_ticks_override); | ||||
|         WriteBasicSetting(Settings::values.steps_per_hour); | ||||
|         WriteBasicSetting(Settings::values.plugin_loader_enabled); | ||||
|         WriteBasicSetting(Settings::values.allow_plugin_loader); | ||||
|     } | ||||
|  |  | |||
|  | @ -328,6 +328,8 @@ void ConfigureSystem::SetConfiguration() { | |||
|     ui->edit_init_ticks_value->setText( | ||||
|         QString::number(Settings::values.init_ticks_override.GetValue())); | ||||
| 
 | ||||
|     ui->spinBox_steps_per_hour->setValue(Settings::values.steps_per_hour.GetValue()); | ||||
| 
 | ||||
|     cfg = Service::CFG::GetModule(system); | ||||
|     ReadSystemSettings(); | ||||
| 
 | ||||
|  | @ -460,6 +462,8 @@ void ConfigureSystem::ApplyConfiguration() { | |||
|         Settings::values.init_ticks_override = | ||||
|             static_cast<s64>(ui->edit_init_ticks_value->text().toLongLong()); | ||||
| 
 | ||||
|         Settings::values.steps_per_hour = static_cast<u16>(ui->spinBox_steps_per_hour->value()); | ||||
| 
 | ||||
|         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; | ||||
| 
 | ||||
|  | @ -631,8 +635,10 @@ void ConfigureSystem::SetupPerGameUI() { | |||
|     ui->label_language->setVisible(false); | ||||
|     ui->label_country->setVisible(false); | ||||
|     ui->label_play_coins->setVisible(false); | ||||
|     ui->label_steps_per_hour->setVisible(false); | ||||
|     ui->edit_username->setVisible(false); | ||||
|     ui->spinBox_play_coins->setVisible(false); | ||||
|     ui->spinBox_steps_per_hour->setVisible(false); | ||||
|     ui->combo_birthday->setVisible(false); | ||||
|     ui->combo_birthmonth->setVisible(false); | ||||
|     ui->combo_init_clock->setVisible(false); | ||||
|  |  | |||
|  | @ -392,21 +392,35 @@ | |||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="13" column="0"> | ||||
|               <widget class="QLabel" name="label_steps_per_hour"> | ||||
|                 <property name="text"> | ||||
|                   <string>Pedometer steps per hour:</string> | ||||
|                 </property> | ||||
|               </widget> | ||||
|             </item> | ||||
|             <item row="13" column="1"> | ||||
|               <widget class="QSpinBox" name="spinBox_steps_per_hour"> | ||||
|                 <property name="maximum"> | ||||
|                   <number>9999</number> | ||||
|                 </property> | ||||
|               </widget> | ||||
|             </item> | ||||
|             <item row="14" column="1"> | ||||
|              <widget class="QCheckBox" name="toggle_system_setup"> | ||||
|               <property name="text"> | ||||
|                <string>Run System Setup when Home Menu is launched</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="14" column="0"> | ||||
|             <item row="15" column="0"> | ||||
|              <widget class="QLabel" name="label_console_id"> | ||||
|               <property name="text"> | ||||
|                <string>Console ID:</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="14" column="1"> | ||||
|             <item row="15" column="1"> | ||||
|              <widget class="QPushButton" name="button_regenerate_console_id"> | ||||
|               <property name="sizePolicy"> | ||||
|                <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||||
|  | @ -422,35 +436,35 @@ | |||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="15" column="0"> | ||||
|             <item row="16" column="0"> | ||||
|              <widget class="QLabel" name="label_plugin_loader"> | ||||
|               <property name="text"> | ||||
|                <string>3GX Plugin Loader:</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="15" column="1"> | ||||
|             <item row="16" column="1"> | ||||
|              <widget class="QCheckBox" name="plugin_loader"> | ||||
|               <property name="text"> | ||||
|                <string>Enable 3GX plugin loader</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="16" column="1"> | ||||
|             <item row="17" column="1"> | ||||
|              <widget class="QCheckBox" name="allow_plugin_loader"> | ||||
|               <property name="text"> | ||||
|                <string>Allow games to change plugin loader state</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="17" column="0"> | ||||
|             <item row="18" column="0"> | ||||
|              <widget class="QLabel" name="label_nus_download"> | ||||
|               <property name="text"> | ||||
|                <string>Download System Files from Nitendo servers</string> | ||||
|               </property> | ||||
|              </widget> | ||||
|             </item> | ||||
|             <item row="17" column="1"> | ||||
|             <item row="18" column="1"> | ||||
|              <widget class="QWidget" name="body_nus_download"> | ||||
|               <layout class="QHBoxLayout" name="horizontalLayout_nus_download"> | ||||
|                <item> | ||||
|  | @ -692,6 +706,7 @@ | |||
|   <tabstop>combo_init_clock</tabstop> | ||||
|   <tabstop>edit_init_time</tabstop> | ||||
|   <tabstop>spinBox_play_coins</tabstop> | ||||
|   <tabstop>spinBox_steps_per_hour</tabstop> | ||||
|   <tabstop>button_regenerate_console_id</tabstop> | ||||
|  </tabstops> | ||||
|  <resources/> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue