mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Merge pull request #2240 from wwylele/auto-region
Config: auto-select region and language
This commit is contained in:
		
						commit
						f556d6ee90
					
				
					 11 changed files with 108 additions and 7 deletions
				
			
		|  | @ -72,7 +72,8 @@ void Config::ReadValues() { | |||
| 
 | ||||
|     qt_config->beginGroup("System"); | ||||
|     Settings::values.is_new_3ds = qt_config->value("is_new_3ds", false).toBool(); | ||||
|     Settings::values.region_value = qt_config->value("region_value", 1).toInt(); | ||||
|     Settings::values.region_value = | ||||
|         qt_config->value("region_value", Settings::REGION_VALUE_AUTO_SELECT).toInt(); | ||||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Miscellaneous"); | ||||
|  |  | |||
|  | @ -23,13 +23,15 @@ void ConfigureGeneral::setConfiguration() { | |||
|     ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan); | ||||
|     ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing); | ||||
|     ui->toggle_cpu_jit->setChecked(Settings::values.use_cpu_jit); | ||||
|     ui->region_combobox->setCurrentIndex(Settings::values.region_value); | ||||
| 
 | ||||
|     // The first item is "auto-select" with actual value -1, so plus one here will do the trick
 | ||||
|     ui->region_combobox->setCurrentIndex(Settings::values.region_value + 1); | ||||
| } | ||||
| 
 | ||||
| void ConfigureGeneral::applyConfiguration() { | ||||
|     UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked(); | ||||
|     UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); | ||||
|     Settings::values.region_value = ui->region_combobox->currentIndex(); | ||||
|     Settings::values.region_value = ui->region_combobox->currentIndex() - 1; | ||||
|     Settings::values.use_cpu_jit = ui->toggle_cpu_jit->isChecked(); | ||||
|     Settings::Apply(); | ||||
| } | ||||
|  |  | |||
|  | @ -82,6 +82,11 @@ | |||
|             </item> | ||||
|             <item> | ||||
|              <widget class="QComboBox" name="region_combobox"> | ||||
|               <item> | ||||
|                <property name="text"> | ||||
|                 <string>Auto-select</string> | ||||
|                </property> | ||||
|               </item> | ||||
|               <item> | ||||
|                <property name="text"> | ||||
|                 <string notr="true">JPN</string> | ||||
|  |  | |||
|  | @ -129,6 +129,9 @@ | |||
|         </item> | ||||
|         <item row="2" column="1"> | ||||
|          <widget class="QComboBox" name="combo_language"> | ||||
|           <property name="toolTip"> | ||||
|            <string>Note: this can be overridden when region setting is auto-select</string> | ||||
|           </property> | ||||
|           <item> | ||||
|            <property name="text"> | ||||
|             <string>Japanese (日本語)</string> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue