From: divverent Date: Sat, 20 Dec 2008 15:11:33 +0000 (+0000) Subject: fix keys X-Git-Tag: svn-r421~278 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=733ae2732e74509142e7722a5ab13e4d8f69952d;p=xonotic%2Fnetradiant.git fix keys git-svn-id: svn://svn.icculus.org/netradiant/trunk@142 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/cross-Makefile.conf b/cross-Makefile.conf index 2a7076e6..f503195d 100644 --- a/cross-Makefile.conf +++ b/cross-Makefile.conf @@ -3,10 +3,10 @@ # edit the paths in here # how to call the mingw tools -MINGW_EXEC_PREFIX = /home/divverent/mingw/bin/i386-mingw32- +MINGW_EXEC_PREFIX = i586-mingw32msvc- # where the dependencies package is extracted -RADIANT_DEPENDENCIES_PREFIX = /home/divverent/radiant-deps-mingw32/ +RADIANT_DEPENDENCIES_PREFIX = $(HOME)/radiant-deps-mingw32/ # run the prefix fixing tool IGNORETHIS := $(shell cd $(RADIANT_DEPENDENCIES_PREFIX) && ./fixprefix.sh) diff --git a/radiant/commands.cpp b/radiant/commands.cpp index c1e1b2a3..cee17117 100644 --- a/radiant/commands.cpp +++ b/radiant/commands.cpp @@ -267,6 +267,7 @@ void SaveCommandMap(const char* path) m_file << name << "="; const char* key = global_keys_find(accelerator.key); + if(!string_empty(key)) { m_file << key; @@ -328,6 +329,7 @@ public: int modifiers = 0; const char* last = value + string_length(value); const char* keyEnd = stringrange_find(value, last, '+'); + for(const char* modifier = keyEnd; modifier != last;) { const char* next = stringrange_find(modifier + 1, last, '+'); @@ -357,7 +359,7 @@ public: // strBuff has been cleaned of it's modifiers .. switch between a regular key and a virtual one // based on length - if(keyEnd - value == 1) // most often case.. deal with first + if(keyEnd - value == 1 && std::isalpha(value[0])) // most often case.. deal with first { accelerator.key = std::toupper(value[0]); ++m_count;