mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	fix preffered game
This commit is contained in:
		
							parent
							
								
									1a57f9488f
								
							
						
					
					
						commit
						31a9fdb00b
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		|  | @ -25,7 +25,7 @@ | |||
| HostRoomWindow::HostRoomWindow(QWidget* parent, QStandardItemModel* list, | ||||
|                                std::shared_ptr<Core::AnnounceMultiplayerSession> session) | ||||
|     : QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint), | ||||
|       ui(std::make_unique<Ui::HostRoom>()), announce_multiplayer_session(session), game_list(list) { | ||||
|       ui(std::make_unique<Ui::HostRoom>()), announce_multiplayer_session(session) { | ||||
|     ui->setupUi(this); | ||||
| 
 | ||||
|     // set up validation for all of the fields
 | ||||
|  | @ -35,6 +35,15 @@ HostRoomWindow::HostRoomWindow(QWidget* parent, QStandardItemModel* list, | |||
|     ui->port->setPlaceholderText(QString::number(Network::DefaultRoomPort)); | ||||
| 
 | ||||
|     // Create a proxy to the game list to display the list of preferred games
 | ||||
|     game_list = new QStandardItemModel; | ||||
| 
 | ||||
|     for (int i = 0; i < list->rowCount(); i++) { | ||||
|         auto parent = list->item(i, 0); | ||||
|         for (int j = 0; j < parent->rowCount(); j++) { | ||||
|             game_list->appendRow(parent->child(j)->clone()); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     proxy = new ComboBoxProxyModel; | ||||
|     proxy->setSourceModel(game_list); | ||||
|     proxy->sort(0, Qt::AscendingOrder); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue