Qt/GameList: Add "Host with NetPlay" option
This commit is contained in:
parent
13fac93a29
commit
2e29509b75
|
@ -200,7 +200,9 @@ void GameList::ShowContextMenu(const QPoint&)
|
||||||
|
|
||||||
QAction* netplay_host = new QAction(tr("Host with NetPlay"), menu);
|
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,
|
connect(this, &GameList::EmulationStarted, netplay_host,
|
||||||
[netplay_host] { netplay_host->setEnabled(false); });
|
[netplay_host] { netplay_host->setEnabled(false); });
|
||||||
connect(this, &GameList::EmulationStopped, netplay_host,
|
connect(this, &GameList::EmulationStopped, netplay_host,
|
||||||
|
|
|
@ -32,7 +32,7 @@ signals:
|
||||||
void GameSelected();
|
void GameSelected();
|
||||||
void EmulationStarted();
|
void EmulationStarted();
|
||||||
void EmulationStopped();
|
void EmulationStopped();
|
||||||
void NetPlayHost(const QString& game_path);
|
void NetPlayHost(const QString& game_id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ShowContextMenu(const QPoint&);
|
void ShowContextMenu(const QPoint&);
|
||||||
|
|
Loading…
Reference in New Issue