From 0e26368c8960e144d644d438568a0d576e7bed31 Mon Sep 17 00:00:00 2001 From: Xawotihs Date: Thu, 26 May 2011 21:24:17 +0000 Subject: [PATCH] Fixed JGE key binding in SDL config --- JGE/JGE.vcxproj | 6 +++--- projects/mtg/src/GameOptions.cpp | 12 +++++------- projects/mtg/src/TranslateKeys.cpp | 7 ++----- projects/mtg/template.vcxproj | 16 ++++++++-------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/JGE/JGE.vcxproj b/JGE/JGE.vcxproj index 67d51a139..db9524119 100644 --- a/JGE/JGE.vcxproj +++ b/JGE/JGE.vcxproj @@ -73,7 +73,7 @@ MaxSpeed OnlyExplicitInline Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + SDL_CONFIG;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -101,7 +101,7 @@ Disabled Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + SDL_CONFIG;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDLL @@ -129,7 +129,7 @@ Full OnlyExplicitInline Dependencies/SDL/include;Dependencies/include;$(JGEEXTRAS);../Boost;../projects/mtg/include;include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_HAS_ITERATOR_DEBBUGING=0;%(PreprocessorDefinitions) + SDL_CONFIG;WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_HAS_ITERATOR_DEBBUGING=0;%(PreprocessorDefinitions) true MultiThreadedDLL true diff --git a/projects/mtg/src/GameOptions.cpp b/projects/mtg/src/GameOptions.cpp index 0c75280ac..9f8959eab 100644 --- a/projects/mtg/src/GameOptions.cpp +++ b/projects/mtg/src/GameOptions.cpp @@ -33,18 +33,16 @@ const string Options::optionNames[] = { "transitions", "bgStyle", "interruptSeconds", -#if defined(QT_CONFIG) +#if defined(SDL_CONFIG) + "keybindings_sdl", +#elif defined(QT_CONFIG) "keybindings_qt", -#else -#if defined(WIN32) +#elif defined(WIN32) "keybindings_win", -#else -#if defined(LINUX) +#elif defined(LINUX) "keybindings_x", #else "keybindings_psp", -#endif -#endif #endif "aidecks", "interruptMySpells", diff --git a/projects/mtg/src/TranslateKeys.cpp b/projects/mtg/src/TranslateKeys.cpp index 537899669..74db1ccd5 100644 --- a/projects/mtg/src/TranslateKeys.cpp +++ b/projects/mtg/src/TranslateKeys.cpp @@ -12,7 +12,7 @@ using std::map; static map fattable; static map slimtable; -#if defined(LINUX) || defined (IOS) || defined (ANDROID) +#if defined(LINUX) || defined (IOS) || defined (ANDROID) || defined (SDL_CONFIG) || defined (QT_CONFIG) const KeyRep& translateKey(LocalKeySym key) { { @@ -37,9 +37,7 @@ const KeyRep& translateKey(LocalKeySym key) fattable[key] = k; return fattable[key]; } -#else -#ifdef WIN32 - +#elif defined(WIN32) const KeyRep& translateKey(LocalKeySym key) { { @@ -135,7 +133,6 @@ const KeyRep& translateKey(LocalKeySym key) return k; } #endif -#endif const KeyRep& translateKey(JButton key) { /* diff --git a/projects/mtg/template.vcxproj b/projects/mtg/template.vcxproj index 02b7e7d2d..8ec05e936 100644 --- a/projects/mtg/template.vcxproj +++ b/projects/mtg/template.vcxproj @@ -107,8 +107,8 @@ MaxSpeed OnlyExplicitInline - ./include;$(MTGEXTRAS);../../JGE/include;../../JGE/Dependencies/include;../../Boost;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + ./include;$(MTGEXTRAS);../../JGE/include;../../JGE/Dependencies/include;../../Boost;../../JGE/Dependencies/SDL/include;%(AdditionalIncludeDirectories) + SDL_CONFIG;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -155,8 +155,8 @@ Disabled - ./include;$(MTGEXTRAS);../../JGE/include;../../JGE/Dependencies/include;../../Boost;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ./include;$(MTGEXTRAS);../../JGE/include;../../JGE/Dependencies/include;../../Boost;../../JGE/Dependencies/SDL/include;%(AdditionalIncludeDirectories) + SDL_CONFIG;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -207,8 +207,8 @@ Full OnlyExplicitInline - ./include;$(MTGEXTRAS);../../JGE/include;../../JGE/Dependencies/include;../../Boost;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_SECURE_SCL=0;_HAS_ITERATOR_DEBBUGING=0;%(PreprocessorDefinitions) + ./include;$(MTGEXTRAS);../../JGE/include;../../JGE/Dependencies/include;../../Boost;../../JGE/Dependencies/SDL/include;%(AdditionalIncludeDirectories) + SDL_CONFIG;WIN32;NDEBUG;_WINDOWS;_SECURE_SCL=0;_HAS_ITERATOR_DEBBUGING=0;%(PreprocessorDefinitions) true MultiThreadedDLL true @@ -258,8 +258,8 @@ Disabled - ./include;$(MTGEXTRAS);../../JGE/include;../../JGE/Dependencies/include;../../Boost;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ./include;$(MTGEXTRAS);../../JGE/include;../../JGE/Dependencies/include;../../Boost;../../JGE/Dependencies/SDL/include;%(AdditionalIncludeDirectories) + SDL_CONFIG;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL