mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	address some comments
This commit is contained in:
		
							parent
							
								
									5a4c7c32d8
								
							
						
					
					
						commit
						5a14af5f38
					
				
					 5 changed files with 30 additions and 27 deletions
				
			
		|  | @ -113,7 +113,7 @@ void Config::ReadValues() { | |||
| 
 | ||||
|     Settings::LoadProfile(Settings::values.current_input_profile_index); | ||||
| 
 | ||||
|     qt_config->endArray(); | ||||
|     qt_config->endGroup(); | ||||
| 
 | ||||
|     qt_config->beginGroup("Core"); | ||||
|     Settings::values.use_cpu_jit = ReadSetting("use_cpu_jit", true).toBool(); | ||||
|  |  | |||
|  | @ -42,7 +42,7 @@ void ConfigureDialog::applyConfiguration() { | |||
|     ui->generalTab->applyConfiguration(); | ||||
|     ui->systemTab->applyConfiguration(); | ||||
|     ui->inputTab->applyConfiguration(); | ||||
|     ui->inputTab->applyProfile(); | ||||
|     ui->inputTab->ApplyProfile(); | ||||
|     ui->graphicsTab->applyConfiguration(); | ||||
|     ui->audioTab->applyConfiguration(); | ||||
|     ui->cameraTab->applyConfiguration(); | ||||
|  |  | |||
|  | @ -224,11 +224,14 @@ ConfigureInput::ConfigureInput(QWidget* parent) | |||
|         QDialog* motion_touch_dialog = new ConfigureMotionTouch(this); | ||||
|         return motion_touch_dialog->exec(); | ||||
|     }); | ||||
| 
 | ||||
|     ui->buttonDelete->setEnabled(ui->profile->count() > 1); | ||||
| 
 | ||||
|     connect(ui->buttonClearAll, &QPushButton::released, [this] { ClearAll(); }); | ||||
|     connect(ui->buttonRestoreDefaults, &QPushButton::released, [this]() { restoreDefaults(); }); | ||||
|     connect(ui->buttonNew, &QPushButton::released, [this] { newProfile(); }); | ||||
|     connect(ui->buttonDelete, &QPushButton::released, [this] { deleteProfile(); }); | ||||
|     connect(ui->buttonRename, &QPushButton::released, [this] { renameProfile(); }); | ||||
|     connect(ui->buttonNew, &QPushButton::released, [this] { NewProfile(); }); | ||||
|     connect(ui->buttonDelete, &QPushButton::released, [this] { DeleteProfile(); }); | ||||
|     connect(ui->buttonRename, &QPushButton::released, [this] { RenameProfile(); }); | ||||
| 
 | ||||
|     connect(ui->profile, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), | ||||
|             [this](int i) { | ||||
|  | @ -269,7 +272,7 @@ void ConfigureInput::applyConfiguration() { | |||
|                    [](const Common::ParamPackage& param) { return param.Serialize(); }); | ||||
| } | ||||
| 
 | ||||
| void ConfigureInput::applyProfile() { | ||||
| void ConfigureInput::ApplyProfile() { | ||||
|     Settings::values.current_input_profile_index = ui->profile->currentIndex(); | ||||
| } | ||||
| 
 | ||||
|  | @ -390,7 +393,7 @@ void ConfigureInput::retranslateUi() { | |||
|     ui->retranslateUi(this); | ||||
| } | ||||
| 
 | ||||
| void ConfigureInput::newProfile() { | ||||
| void ConfigureInput::NewProfile() { | ||||
|     const QString name = | ||||
|         QInputDialog::getText(this, tr("New Profile"), tr("Enter the name for the new profile.")); | ||||
|     if (name.isEmpty()) { | ||||
|  | @ -402,13 +405,10 @@ void ConfigureInput::newProfile() { | |||
|     ui->profile->addItem(name); | ||||
|     ui->profile->setCurrentIndex(Settings::values.current_input_profile_index); | ||||
|     loadConfiguration(); | ||||
|     ui->buttonDelete->setEnabled(ui->profile->count() > 1); | ||||
| } | ||||
| 
 | ||||
| void ConfigureInput::deleteProfile() { | ||||
|     if (ui->profile->count() == 1) { | ||||
|         QMessageBox::critical(this, tr("Citra"), tr("You need to have 1 profile at least")); | ||||
|         return; | ||||
|     } | ||||
| void ConfigureInput::DeleteProfile() { | ||||
|     const auto answer = QMessageBox::question( | ||||
|         this, tr("Delete Profile"), tr("Delete profile %1?").arg(ui->profile->currentText())); | ||||
|     if (answer != QMessageBox::Yes) { | ||||
|  | @ -419,9 +419,10 @@ void ConfigureInput::deleteProfile() { | |||
|     ui->profile->setCurrentIndex(0); | ||||
|     Settings::DeleteProfile(index); | ||||
|     loadConfiguration(); | ||||
|     ui->buttonDelete->setEnabled(ui->profile->count() > 1); | ||||
| } | ||||
| 
 | ||||
| void ConfigureInput::renameProfile() { | ||||
| void ConfigureInput::RenameProfile() { | ||||
|     const QString new_name = QInputDialog::getText(this, tr("Rename Profile"), tr("New name:")); | ||||
|     if (new_name.isEmpty()) { | ||||
|         return; | ||||
|  |  | |||
|  | @ -40,7 +40,7 @@ public: | |||
|     void loadConfiguration(); | ||||
| 
 | ||||
|     // Save the current input profile index
 | ||||
|     void applyProfile(); | ||||
|     void ApplyProfile(); | ||||
| 
 | ||||
| private: | ||||
|     std::unique_ptr<Ui::ConfigureInput> ui; | ||||
|  | @ -96,7 +96,7 @@ private: | |||
|     void keyPressEvent(QKeyEvent* event) override; | ||||
| 
 | ||||
|     /// input profiles
 | ||||
|     void newProfile(); | ||||
|     void deleteProfile(); | ||||
|     void renameProfile(); | ||||
|     void NewProfile(); | ||||
|     void DeleteProfile(); | ||||
|     void RenameProfile(); | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue