From 97f44035f1b3ebd2681236c23f14c4d3ea7f09ac Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 7 Oct 2012 00:46:46 +0200 Subject: Changing and saving input bindings --- src/common/restext.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/common/restext.cpp') diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 0f33f52..9a3d964 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -105,7 +105,7 @@ static void PutKeyName(char* dst, const char* src) { if ( SearchKey(src+s+5, key) ) { - res = CRobotMain::GetInstancePointer()->GetInputBinding(key).key; + res = CRobotMain::GetInstancePointer()->GetInputBinding(key).primary; if (res != KEY_INVALID) { if ( GetResource(RES_KEY, res, name) ) @@ -172,7 +172,9 @@ static const char* GetResourceBase(ResType type, int num) case RES_KEY: - if (num == VIRTUAL_KMOD_CTRL) + if (num == KEY_INVALID) + return ""; + else if (num == VIRTUAL_KMOD_CTRL) return "Ctrl"; else if (num == VIRTUAL_KMOD_SHIFT) return "Shift"; -- cgit v1.2.3-1-g7c22