From 2e29509b75652a5446873121177db511e134415b Mon Sep 17 00:00:00 2001 From: spycrab Date: Mon, 24 Jul 2017 16:02:12 +0200 Subject: [PATCH] Qt/GameList: Add "Host with NetPlay" option --- Source/Core/DolphinQt2/GameList/GameList.cpp | 4 +++- Source/Core/DolphinQt2/GameList/GameList.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt2/GameList/GameList.cpp b/Source/Core/DolphinQt2/GameList/GameList.cpp index 14fd59007c..00e8632f12 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.cpp +++ b/Source/Core/DolphinQt2/GameList/GameList.cpp @@ -200,7 +200,9 @@ void GameList::ShowContextMenu(const QPoint&) QAction* netplay_host = new QAction(tr("Host with NetPlay"), menu); - connect(netplay_host, &QAction::triggered, [this, game] { emit NetPlayHost(game); }); + connect(netplay_host, &QAction::triggered, + [this, game] { emit NetPlayHost(GameFile(game).GetUniqueID()); }); + connect(this, &GameList::EmulationStarted, netplay_host, [netplay_host] { netplay_host->setEnabled(false); }); connect(this, &GameList::EmulationStopped, netplay_host, diff --git a/Source/Core/DolphinQt2/GameList/GameList.h b/Source/Core/DolphinQt2/GameList/GameList.h index c7a7be7f89..dbe4a9a568 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.h +++ b/Source/Core/DolphinQt2/GameList/GameList.h @@ -32,7 +32,7 @@ signals: void GameSelected(); void EmulationStarted(); void EmulationStopped(); - void NetPlayHost(const QString& game_path); + void NetPlayHost(const QString& game_id); private: void ShowContextMenu(const QPoint&);