forked from speed-dreams/speed-dreams-code
Allow uppercase characters to be used in Control Configuration : Ticket 955
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6407 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 76d8a07200386b5dba20b361a01eace415e2383a Former-commit-id: 60512ee67f9042fe95f560ceb917390f1ab6b637
This commit is contained in:
parent
b39119dffc
commit
29564c2b19
2 changed files with 8 additions and 0 deletions
|
@ -230,14 +230,19 @@ TGFCLIENT_API tScreenSize* GfScrGetDefaultSizes(int* pnSizes);
|
||||||
#define GFUIK_F14 SDLK_F14
|
#define GFUIK_F14 SDLK_F14
|
||||||
#define GFUIK_F15 SDLK_F15
|
#define GFUIK_F15 SDLK_F15
|
||||||
|
|
||||||
|
#define GFUIK_RSHIFT SDLK_RSHIFT
|
||||||
|
#define GFUIK_LSHIFT SDLK_LSHIFT
|
||||||
|
|
||||||
// Add needed other GFUIK_* here or above.
|
// Add needed other GFUIK_* here or above.
|
||||||
|
|
||||||
// Maximun value of a key code (Has to be the least greater 2^N - 1 >= SDLK_LAST)
|
// Maximun value of a key code (Has to be the least greater 2^N - 1 >= SDLK_LAST)
|
||||||
#define GFUIK_MAX GF_MAX_KEYCODE
|
#define GFUIK_MAX GF_MAX_KEYCODE
|
||||||
|
|
||||||
|
#if SDL_MAJOR_VERSION < 2 // SDLK_LAST no longer defined as of SDL2
|
||||||
#if (GFUIK_MAX < SDLK_LAST)
|
#if (GFUIK_MAX < SDLK_LAST)
|
||||||
# error SDLK_MAX has grown too much, please increase GF_MAX_KEYCODE to the least greater power of 2 minus 1.
|
# error SDLK_MAX has grown too much, please increase GF_MAX_KEYCODE to the least greater power of 2 minus 1.
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/** Scroll bar call-back information */
|
/** Scroll bar call-back information */
|
||||||
|
|
|
@ -327,6 +327,9 @@ onKeyAction(int key, int /* modifier */, int state)
|
||||||
if (!InputWaited || state == GFUI_KEY_UP) {
|
if (!InputWaited || state == GFUI_KEY_UP) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (key == GFUIK_RSHIFT || key == GFUIK_LSHIFT) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (key == GFUIK_ESCAPE) {
|
if (key == GFUIK_ESCAPE) {
|
||||||
/* escape */
|
/* escape */
|
||||||
Cmd[CurrentCmd].ref.index = -1;
|
Cmd[CurrentCmd].ref.index = -1;
|
||||||
|
|
Loading…
Reference in a new issue