mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #4627 from FearlessTobi/cia-install-short
citra_qt: when opening a cia file directly, make Citra ask to install it
This commit is contained in:
		
						commit
						c3e6610807
					
				
					 2 changed files with 17 additions and 0 deletions
				
			
		|  | @ -803,6 +803,18 @@ bool GMainWindow::LoadROM(const QString& filename) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void GMainWindow::BootGame(const QString& filename) { | void GMainWindow::BootGame(const QString& filename) { | ||||||
|  |     if (filename.endsWith(".cia")) { | ||||||
|  |         const auto answer = QMessageBox::question( | ||||||
|  |             this, tr("CIA must be installed before usage"), | ||||||
|  |             tr("Before using this CIA, you must install it. Do you want to install it now?"), | ||||||
|  |             QMessageBox::Yes | QMessageBox::No); | ||||||
|  | 
 | ||||||
|  |         if (answer == QMessageBox::Yes) | ||||||
|  |             InstallCIA(QStringList(filename)); | ||||||
|  | 
 | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     LOG_INFO(Frontend, "Citra starting..."); |     LOG_INFO(Frontend, "Citra starting..."); | ||||||
|     StoreRecentFile(filename); // Put the filename on top of the list
 |     StoreRecentFile(filename); // Put the filename on top of the list
 | ||||||
| 
 | 
 | ||||||
|  | @ -1077,6 +1089,10 @@ void GMainWindow::OnMenuInstallCIA() { | ||||||
|     if (filepaths.isEmpty()) |     if (filepaths.isEmpty()) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|  |     InstallCIA(filepaths); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void GMainWindow::InstallCIA(QStringList filepaths) { | ||||||
|     ui.action_Install_CIA->setEnabled(false); |     ui.action_Install_CIA->setEnabled(false); | ||||||
|     game_list->setDirectoryWatcherEnabled(false); |     game_list->setDirectoryWatcherEnabled(false); | ||||||
|     progress_bar->show(); |     progress_bar->show(); | ||||||
|  |  | ||||||
|  | @ -199,6 +199,7 @@ private: | ||||||
|     void LoadTranslation(); |     void LoadTranslation(); | ||||||
|     void SetupUIStrings(); |     void SetupUIStrings(); | ||||||
|     void RetranslateStatusBar(); |     void RetranslateStatusBar(); | ||||||
|  |     void InstallCIA(QStringList filepaths); | ||||||
| 
 | 
 | ||||||
|     Ui::MainWindow ui; |     Ui::MainWindow ui; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue