mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
Qt/NetPlayDialog: Stop games properly
This commit is contained in:
@ -607,14 +607,17 @@ unsigned int NetPlayServer::OnData(sf::Packet& packet, Client& player)
|
||||
|
||||
case NP_MSG_STOP_GAME:
|
||||
{
|
||||
if (!m_is_running)
|
||||
break;
|
||||
|
||||
m_is_running = false;
|
||||
|
||||
// tell clients to stop game
|
||||
sf::Packet spac;
|
||||
spac << (MessageId)NP_MSG_STOP_GAME;
|
||||
|
||||
std::lock_guard<std::recursive_mutex> lkp(m_crit.players);
|
||||
SendToClients(spac);
|
||||
|
||||
m_is_running = false;
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user