diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2021-11-20 19:59:14 +0100 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2021-11-22 00:52:15 +0100 |
| commit | 7b776f376912f66d85f3aa6a68de39106c6144b8 (patch) | |
| tree | 53c68a10f89710d5c4d73f5bfe7244e5a8e4b1eb /Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp | |
| parent | 83ad84061e05fd7d07998757aa3fc9622066573f (diff) | |
NetPlay: Refactor game boot code path to allow passing BootSessionData through it.
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp index 464cb506db..7e05a51add 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp @@ -31,6 +31,7 @@ #include "Common/Logging/Log.h" #include "Common/TraversalClient.h" +#include "Core/Boot/Boot.h" #include "Core/Config/GraphicsSettings.h" #include "Core/Config/MainSettings.h" #include "Core/Config/NetplaySettings.h" @@ -62,8 +63,10 @@ #include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoConfig.h" -NetPlayDialog::NetPlayDialog(const GameListModel& game_list_model, QWidget* parent) - : QDialog(parent), m_game_list_model(game_list_model) +NetPlayDialog::NetPlayDialog(const GameListModel& game_list_model, + StartGameCallback start_game_callback, QWidget* parent) + : QDialog(parent), m_game_list_model(game_list_model), + m_start_game_callback(std::move(start_game_callback)) { setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); @@ -682,10 +685,11 @@ void NetPlayDialog::UpdateGUI() // NetPlayUI methods -void NetPlayDialog::BootGame(const std::string& filename) +void NetPlayDialog::BootGame(const std::string& filename, + std::unique_ptr<BootSessionData> boot_session_data) { m_got_stop_request = false; - emit Boot(QString::fromStdString(filename)); + m_start_game_callback(filename, std::move(boot_session_data)); } void NetPlayDialog::StopGame() |
