mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
NetPlay: Refactor game boot code path to allow passing BootSessionData through it.
This commit is contained in:
@ -1372,13 +1372,15 @@ void MainWindow::NetPlayInit()
|
||||
{
|
||||
const auto& game_list_model = m_game_list->GetGameListModel();
|
||||
m_netplay_setup_dialog = new NetPlaySetupDialog(game_list_model, this);
|
||||
m_netplay_dialog = new NetPlayDialog(game_list_model);
|
||||
m_netplay_dialog = new NetPlayDialog(
|
||||
game_list_model,
|
||||
[this](const std::string& path, std::unique_ptr<BootSessionData> boot_session_data) {
|
||||
StartGame(path, ScanForSecondDisc::Yes, std::move(boot_session_data));
|
||||
});
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
m_netplay_discord = new DiscordHandler(this);
|
||||
#endif
|
||||
|
||||
connect(m_netplay_dialog, &NetPlayDialog::Boot, this,
|
||||
[this](const QString& path) { StartGame(path, ScanForSecondDisc::Yes); });
|
||||
connect(m_netplay_dialog, &NetPlayDialog::Stop, this, &MainWindow::ForceStop);
|
||||
connect(m_netplay_dialog, &NetPlayDialog::rejected, this, &MainWindow::NetPlayQuit);
|
||||
connect(m_netplay_setup_dialog, &NetPlaySetupDialog::Join, this, &MainWindow::NetPlayJoin);
|
||||
|
Reference in New Issue
Block a user