- attempt to improve network performance and log more info regarding menu and network performance
This commit is contained in:
parent
6c30b387ec
commit
ada90b4e27
|
@ -839,6 +839,9 @@ void MenuStateConnectedGame::update() {
|
|||
if(clientInterface != NULL && clientInterface->isConnected()) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] clientInterface = %p\n",__FILE__,__FUNCTION__,__LINE__,clientInterface);
|
||||
clientInterface->updateLobby();
|
||||
|
||||
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
||||
if(chrono.getMillis() > 0) chrono.start();
|
||||
}
|
||||
|
||||
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
||||
|
@ -857,6 +860,9 @@ void MenuStateConnectedGame::update() {
|
|||
switchSetupRequestFlagType=ssrft_None;
|
||||
}
|
||||
|
||||
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());
|
||||
if(chrono.getMillis() > 0) chrono.start();
|
||||
|
||||
//call the chat manager
|
||||
chatManager.updateNetwork();
|
||||
|
||||
|
@ -865,15 +871,13 @@ void MenuStateConnectedGame::update() {
|
|||
console.update();
|
||||
|
||||
//intro
|
||||
if(clientInterface->getIntroDone())
|
||||
{
|
||||
if(clientInterface->getIntroDone()) {
|
||||
labelInfo.setText(lang.get("WaitingHost"));
|
||||
//servers.setString(clientInterface->getServerName(), Ip(labelServerIp.getText()).getString());
|
||||
}
|
||||
|
||||
//launch
|
||||
if(clientInterface->getLaunchGame())
|
||||
{
|
||||
if(clientInterface->getLaunchGame()) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
//servers.save(serversSavedFile);
|
||||
|
|
|
@ -1162,13 +1162,10 @@ void Socket::setBlock(bool block, PLATFORM_SOCKET socket){
|
|||
|
||||
bool Socket::isReadable() {
|
||||
if(isSocketValid() == false) return false;
|
||||
#ifndef WIN32
|
||||
struct timeval tv;
|
||||
#else
|
||||
TIMEVAL tv;
|
||||
#endif
|
||||
|
||||
struct timeval tv;
|
||||
tv.tv_sec= 0;
|
||||
tv.tv_usec= 1;
|
||||
tv.tv_usec= 0;
|
||||
|
||||
fd_set set;
|
||||
FD_ZERO(&set);
|
||||
|
@ -1194,11 +1191,7 @@ bool Socket::isReadable() {
|
|||
bool Socket::isWritable(bool waitOnDelayedResponse) {
|
||||
if(isSocketValid() == false) return false;
|
||||
|
||||
#ifndef WIN32
|
||||
struct timeval tv;
|
||||
#else
|
||||
TIMEVAL tv;
|
||||
#endif
|
||||
tv.tv_sec= 0;
|
||||
tv.tv_usec= 1;
|
||||
|
||||
|
@ -1207,8 +1200,7 @@ bool Socket::isWritable(bool waitOnDelayedResponse) {
|
|||
FD_SET(sock, &set);
|
||||
|
||||
bool result = false;
|
||||
do
|
||||
{
|
||||
do {
|
||||
int i = 0;
|
||||
{
|
||||
//MutexSafeWrapper safeMutex(&dataSynchAccessor);
|
||||
|
|
Loading…
Reference in New Issue