From 0557a1195ead054b928f5623985a31912337e9d0 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 12 Nov 2013 15:01:37 +0000 Subject: [PATCH] - added console output for socket errors (lets see if we get this on windows when they slow down) - fixed missing reload ui items in menu --- .../glest_game/menu/menu_state_options_graphics.cpp | 5 ++++- source/shared_lib/sources/platform/posix/socket.cpp | 13 ++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/source/glest_game/menu/menu_state_options_graphics.cpp b/source/glest_game/menu/menu_state_options_graphics.cpp index 5a9971c0c..e6b65520d 100644 --- a/source/glest_game/menu/menu_state_options_graphics.cpp +++ b/source/glest_game/menu/menu_state_options_graphics.cpp @@ -425,6 +425,9 @@ void MenuStateOptionsGraphics::reloadUI() { labelShadows.setText(lang.getString("Shadows")); labelShadowTextureSize.setText(lang.getString("ShadowTextureSize")); + labelShadowIntensity.setText(lang.getString("ShadowIntensity")); + labelGammaCorrection.setText(lang.getString("GammaCorrection")); + listboxData.clear(); for(int i= 0; i(i)))); @@ -445,7 +448,7 @@ void MenuStateOptionsGraphics::reloadUI() { labelEnableTextureCompression.setText(lang.getString("EnableTextureCompression")); - labelRainEffect.setText(lang.getString("RainEffect")); + labelRainEffect.setText(lang.getString("RainEffectMenuGame")); labelVideos.setText(lang.getString("EnableVideos")); diff --git a/source/shared_lib/sources/platform/posix/socket.cpp b/source/shared_lib/sources/platform/posix/socket.cpp index 133159704..a5fd4df2e 100644 --- a/source/shared_lib/sources/platform/posix/socket.cpp +++ b/source/shared_lib/sources/platform/posix/socket.cpp @@ -1019,6 +1019,7 @@ bool Socket::hasDataToRead(std::map &socketTriggeredList) } if(retval < 0) { if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d, ERROR SELECTING SOCKET DATA retval = %d error = %s, socketDebugList [%s]\n",__FILE__,__FUNCTION__,__LINE__,retval,getLastSocketErrorFormattedText().c_str(),socketDebugList.c_str()); + printf("In [%s::%s] Line: %d, ERROR SELECTING SOCKET DATA retval = %d error = %s\n",__FILE__,__FUNCTION__,__LINE__,retval,getLastSocketErrorFormattedText().c_str()); } else if(retval) { bResult = true; @@ -1068,7 +1069,11 @@ bool Socket::hasDataToRead(PLATFORM_SOCKET socket) //MutexSafeWrapper safeMutex(&dataSynchAccessor); retval = select((int)socket + 1, &rfds, NULL, NULL, &tv); } - if(retval) + if(retval < 0) { + if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d, ERROR SELECTING SOCKET DATA retval = %d error = %s\n",__FILE__,__FUNCTION__,__LINE__,retval,getLastSocketErrorFormattedText().c_str()); + printf("In [%s::%s] Line: %d, ERROR SELECTING SOCKET DATA retval = %d error = %s\n",__FILE__,__FUNCTION__,__LINE__,retval,getLastSocketErrorFormattedText().c_str()); + } + else if(retval) { if (FD_ISSET(socket, &rfds)) { @@ -1108,6 +1113,11 @@ bool Socket::hasDataToReadWithWait(PLATFORM_SOCKET socket,int waitMicroseconds) //MutexSafeWrapper safeMutex(&dataSynchAccessor); retval = select((int)socket + 1, &rfds, NULL, NULL, &tv); } + if(retval < 0) { + if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] Line: %d, ERROR SELECTING SOCKET DATA retval = %d error = %s\n",__FILE__,__FUNCTION__,__LINE__,retval,getLastSocketErrorFormattedText().c_str()); + printf("In [%s::%s] Line: %d, ERROR SELECTING SOCKET DATA retval = %d error = %s\n",__FILE__,__FUNCTION__,__LINE__,retval,getLastSocketErrorFormattedText().c_str()); + } + if(retval) { if (FD_ISSET(socket, &rfds)) @@ -1700,6 +1710,7 @@ bool Socket::isReadable(bool lockMutex) { } if(i < 0) { if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"[%s::%s] error while selecting socket data, err = %d, error = %s\n",__FILE__,__FUNCTION__,i,getLastSocketErrorFormattedText().c_str()); + printf("In [%s::%s] Line: %d, ERROR SELECTING SOCKET DATA retval = %d error = %s\n",__FILE__,__FUNCTION__,__LINE__,i,getLastSocketErrorFormattedText().c_str()); } bool result = (i == 1);