- bugfix for bug reported by gonana (ascii hotkeys work properly once again)

This commit is contained in:
Mark Vejvoda 2011-03-11 06:34:59 +00:00
parent 4757bd3bb8
commit f46eaa159a
3 changed files with 6 additions and 4 deletions

View File

@ -1303,9 +1303,9 @@ void Game::keyDown(char key) {
if(chatManager.getEditEnabled() == false) {
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = [%d - %c]\n",__FILE__,__FUNCTION__,__LINE__,key,key);
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] key = [%d - %c]\n",__FILE__,__FUNCTION__,__LINE__,key,key);
Config &configKeys = Config::getInstance(std::pair<ConfigType,ConfigType>(cfgMainKeys,cfgUserKeys));
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("In [%s::%s Line: %d] key = [%d - %c] pausegame [%d]\n",__FILE__,__FUNCTION__,__LINE__,key,key,configKeys.getCharKey("PauseGame"));
if(key == configKeys.getCharKey("RenderNetworkStatus")) {
renderNetworkStatus= !renderNetworkStatus;

View File

@ -585,6 +585,8 @@ char Config::translateStringToCharKey(const string &value) const {
throw runtime_error(sError.c_str());
}
// Because SDL is based on lower Ascii
result = tolower(result);
return result;
}

View File

@ -442,7 +442,7 @@ bool hasCachedFileCRCValue(string crcCacheFile, int32 &value) {
int res = fscanf(fp,"%ld,%d",&refreshDate,&crcValue);
fclose(fp);
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Found CRC Cache file [%s] now = %ld, refreshDate = %ld, crcValue = %d\n",crcCacheFile.c_str(),time(NULL), refreshDate,crcValue);
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Found CRC Cache file [%s] now = %ld, refreshDate = %ld, crcValue = %d\n",crcCacheFile.c_str(),time(NULL), refreshDate,crcValue);
if( refreshDate > 0 &&
time(NULL) < refreshDate) {
@ -509,7 +509,7 @@ int32 getFolderTreeContentsCheckSumRecursively(vector<string> paths, string path
}
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Looking for CRC Cache file [%s]\n",crcCacheFile.c_str());
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Looking for CRC Cache file [%s]\n",crcCacheFile.c_str());
int32 crcValue = 0;
if(hasCachedFileCRCValue(crcCacheFile, crcValue)) {
crcTreeCache[cacheKey] = crcValue;
@ -584,7 +584,7 @@ int32 getFolderTreeContentsCheckSumRecursively(const string &path, const string
}
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Looking for CRC Cache file [%s]\n",crcCacheFile.c_str());
//if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Looking for CRC Cache file [%s]\n",crcCacheFile.c_str());
int32 crcValue = 0;
if(hasCachedFileCRCValue(crcCacheFile, crcValue)) {
crcTreeCache[cacheKey] = crcValue;