- 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
This commit is contained in:
Mark Vejvoda 2013-11-12 15:01:37 +00:00
parent 41083f9f32
commit 0557a1195e
2 changed files with 16 additions and 2 deletions

View File

@ -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<Renderer::sCount; ++i){
listboxData.push_back(lang.getString(Renderer::shadowsToStr(static_cast<Renderer::Shadows>(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"));

View File

@ -1019,6 +1019,7 @@ bool Socket::hasDataToRead(std::map<PLATFORM_SOCKET,bool> &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);