mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Add Quality of Service (QoS) support
This commit is contained in:

committed by
Pierre Bourdon

parent
3cc64cc146
commit
41682a07cb
@ -21,10 +21,12 @@
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/UPnP.h"
|
||||
#include "Common/Version.h"
|
||||
#include "Core/Config/NetplaySettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/HW/Sram.h"
|
||||
#include "Core/NetPlayClient.h" //for NetPlayUI
|
||||
#include "InputCommon/GCPadStatus.h"
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
@ -273,6 +275,7 @@ unsigned int NetPlayServer::OnConnect(ENetPeer* socket)
|
||||
Client player;
|
||||
player.pid = pid;
|
||||
player.socket = socket;
|
||||
|
||||
rpac >> player.revision;
|
||||
rpac >> player.name;
|
||||
|
||||
@ -343,10 +346,13 @@ unsigned int NetPlayServer::OnConnect(ENetPeer* socket)
|
||||
Send(player.socket, spac);
|
||||
}
|
||||
|
||||
if (Config::Get(Config::NETPLAY_ENABLE_QOS))
|
||||
player.qos_session = Common::QoSSession(player.socket);
|
||||
|
||||
// add client to the player list
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lkp(m_crit.players);
|
||||
m_players.emplace(*(PlayerId*)player.socket->data, player);
|
||||
m_players.emplace(*(PlayerId*)player.socket->data, std::move(player));
|
||||
UpdatePadMapping(); // sync pad mappings with everyone
|
||||
UpdateWiimoteMapping();
|
||||
}
|
||||
|
Reference in New Issue
Block a user