mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
Core/NetPlayServer: Fix session not being added to index on direct connection type
This commit is contained in:
parent
2d6a72e941
commit
06a9f6ef82
3 changed files with 6 additions and 15 deletions
|
@ -101,8 +101,9 @@ NetPlayServer::~NetPlayServer()
|
|||
}
|
||||
|
||||
// called from ---GUI--- thread
|
||||
NetPlayServer::NetPlayServer(const u16 port, const bool forward_port,
|
||||
NetPlayServer::NetPlayServer(const u16 port, const bool forward_port, NetPlayUI* dialog,
|
||||
const NetTraversalConfig& traversal_config)
|
||||
: m_dialog(dialog)
|
||||
{
|
||||
//--use server time
|
||||
if (enet_initialize() != 0)
|
||||
|
@ -209,11 +210,9 @@ void NetPlayServer::SetupIndex()
|
|||
|
||||
session.EncryptID(Config::Get(Config::NETPLAY_INDEX_PASSWORD));
|
||||
|
||||
bool success = m_index.Add(session);
|
||||
if (m_dialog != nullptr)
|
||||
{
|
||||
bool success = m_index.Add(session);
|
||||
m_dialog->OnIndexAdded(success, success ? "" : m_index.GetLastError());
|
||||
}
|
||||
|
||||
m_index.SetErrorCallback([this] {
|
||||
if (m_dialog != nullptr)
|
||||
|
@ -1933,11 +1932,6 @@ u16 NetPlayServer::GetPort() const
|
|||
return m_server->address.port;
|
||||
}
|
||||
|
||||
void NetPlayServer::SetNetPlayUI(NetPlayUI* dialog)
|
||||
{
|
||||
m_dialog = dialog;
|
||||
}
|
||||
|
||||
// called from ---GUI--- thread
|
||||
std::unordered_set<std::string> NetPlayServer::GetInterfaceSet() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue