[ARM] Merge all store instructions in to one. This disables fastmem on stores currently. Hit isn't noticeable since I've also implemented 5 more store instructions with this.
This commit is contained in:
parent
eb8e03fab5
commit
dfce0f3b0b
|
@ -564,6 +564,25 @@ bool NetPlayClient::StopGame()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NetPlayClient::Stop()
|
||||||
|
{
|
||||||
|
if (m_is_running == false)
|
||||||
|
return;
|
||||||
|
bool isPadMapped = false;
|
||||||
|
for (unsigned int i = 0; i < 4; ++i)
|
||||||
|
{
|
||||||
|
if (m_pad_map[i] == m_local_player->pid)
|
||||||
|
isPadMapped = true;
|
||||||
|
}
|
||||||
|
// tell the server to stop if we have a pad mapped in game.
|
||||||
|
if (isPadMapped)
|
||||||
|
{
|
||||||
|
sf::Packet spac;
|
||||||
|
spac << (MessageId)NP_MSG_STOP_GAME;
|
||||||
|
m_socket.Send(spac);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// called from ---CPU--- thread
|
// called from ---CPU--- thread
|
||||||
u8 NetPlayClient::GetPadNum(u8 numPAD)
|
u8 NetPlayClient::GetPadNum(u8 numPAD)
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,6 +74,7 @@ public:
|
||||||
|
|
||||||
bool StartGame(const std::string &path);
|
bool StartGame(const std::string &path);
|
||||||
bool StopGame();
|
bool StopGame();
|
||||||
|
void Stop();
|
||||||
bool ChangeGame(const std::string& game);
|
bool ChangeGame(const std::string& game);
|
||||||
void SendChatMessage(const std::string& msg);
|
void SendChatMessage(const std::string& msg);
|
||||||
|
|
||||||
|
|
|
@ -376,6 +376,20 @@ unsigned int NetPlayServer::OnData(sf::Packet& packet, sf::SocketTCP& socket)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NP_MSG_STOP_GAME:
|
||||||
|
{
|
||||||
|
// tell clients to stop game
|
||||||
|
sf::Packet spac;
|
||||||
|
spac << (MessageId)NP_MSG_STOP_GAME;
|
||||||
|
|
||||||
|
std::lock_guard<std::recursive_mutex> lkp(m_crit.players);
|
||||||
|
std::lock_guard<std::recursive_mutex> lks(m_crit.send);
|
||||||
|
SendToClients(spac);
|
||||||
|
|
||||||
|
m_is_running = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
PanicAlertT("Unknown message with id:%d received from player:%d Kicking player!", mid, player.pid);
|
PanicAlertT("Unknown message with id:%d received from player:%d Kicking player!", mid, player.pid);
|
||||||
// unknown message, kick the client
|
// unknown message, kick the client
|
||||||
|
@ -451,23 +465,6 @@ bool NetPlayServer::StartGame(const std::string &path)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// called from ---GUI--- thread
|
|
||||||
bool NetPlayServer::StopGame()
|
|
||||||
{
|
|
||||||
// tell clients to stop game
|
|
||||||
sf::Packet spac;
|
|
||||||
spac << (MessageId)NP_MSG_STOP_GAME;
|
|
||||||
|
|
||||||
std::lock_guard<std::recursive_mutex> lkp(m_crit.players);
|
|
||||||
std::lock_guard<std::recursive_mutex> lks(m_crit.send);
|
|
||||||
SendToClients(spac);
|
|
||||||
|
|
||||||
m_is_running = false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// called from multiple threads
|
// called from multiple threads
|
||||||
void NetPlayServer::SendToClients(sf::Packet& packet, const PlayerId skip_pid)
|
void NetPlayServer::SendToClients(sf::Packet& packet, const PlayerId skip_pid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,7 +33,6 @@ public:
|
||||||
void SetNetSettings(const NetSettings &settings);
|
void SetNetSettings(const NetSettings &settings);
|
||||||
|
|
||||||
bool StartGame(const std::string &path);
|
bool StartGame(const std::string &path);
|
||||||
bool StopGame();
|
|
||||||
|
|
||||||
void GetPadMapping(PadMapping map[]);
|
void GetPadMapping(PadMapping map[]);
|
||||||
void SetPadMapping(const PadMapping map[]);
|
void SetPadMapping(const PadMapping map[]);
|
||||||
|
|
|
@ -650,8 +650,6 @@ void PadMapDiag::OnAdjust(wxCommandEvent& event)
|
||||||
|
|
||||||
void NetPlay::StopGame()
|
void NetPlay::StopGame()
|
||||||
{
|
{
|
||||||
if (netplay_server != NULL)
|
if (netplay_client != NULL)
|
||||||
netplay_server->StopGame();
|
netplay_client->Stop();
|
||||||
|
|
||||||
// TODO: allow non-hosting clients to close the window
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue