ESC and F1-F12 disabled in game mode
This commit is contained in:
parent
b4c46a29e2
commit
dd333baf38
|
@ -248,7 +248,7 @@ static s32 duk_key(duk_context* duk)
|
|||
{
|
||||
tic_key key = duk_to_int(duk, 0);
|
||||
|
||||
if(key < tic_keys_count)
|
||||
if(key < tic_key_escape)
|
||||
duk_push_boolean(duk, tic->api.key(tic, key));
|
||||
else
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ static s32 duk_keyp(duk_context* duk)
|
|||
{
|
||||
tic_key key = duk_to_int(duk, 0);
|
||||
|
||||
if(key >= tic_keys_count)
|
||||
if(key >= tic_key_escape)
|
||||
{
|
||||
duk_error(duk, DUK_ERR_ERROR, "unknown keyboard code\n");
|
||||
return 0;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
[SDL_SCANCODE_9] = tic_key_9,
|
||||
[SDL_SCANCODE_0] = tic_key_0,
|
||||
[SDL_SCANCODE_RETURN] = tic_key_return,
|
||||
[SDL_SCANCODE_ESCAPE] = tic_key_unknown,
|
||||
[SDL_SCANCODE_ESCAPE] = tic_key_escape,
|
||||
[SDL_SCANCODE_BACKSPACE] = tic_key_backspace,
|
||||
[SDL_SCANCODE_TAB] = tic_key_tab,
|
||||
[SDL_SCANCODE_SPACE] = tic_key_space,
|
||||
|
@ -56,18 +56,18 @@
|
|||
[SDL_SCANCODE_PERIOD] = tic_key_period,
|
||||
[SDL_SCANCODE_SLASH] = tic_key_slash,
|
||||
[SDL_SCANCODE_CAPSLOCK] = tic_key_capslock,
|
||||
[SDL_SCANCODE_F1] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F2] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F3] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F4] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F5] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F6] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F7] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F8] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F9] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F10] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F11] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F12] = tic_key_unknown,
|
||||
[SDL_SCANCODE_F1] = tic_key_f1,
|
||||
[SDL_SCANCODE_F2] = tic_key_f2,
|
||||
[SDL_SCANCODE_F3] = tic_key_f3,
|
||||
[SDL_SCANCODE_F4] = tic_key_f4,
|
||||
[SDL_SCANCODE_F5] = tic_key_f5,
|
||||
[SDL_SCANCODE_F6] = tic_key_f6,
|
||||
[SDL_SCANCODE_F7] = tic_key_f7,
|
||||
[SDL_SCANCODE_F8] = tic_key_f8,
|
||||
[SDL_SCANCODE_F9] = tic_key_f9,
|
||||
[SDL_SCANCODE_F10] = tic_key_f10,
|
||||
[SDL_SCANCODE_F11] = tic_key_f11,
|
||||
[SDL_SCANCODE_F12] = tic_key_f12,
|
||||
[70] = tic_key_unknown,
|
||||
[71] = tic_key_unknown,
|
||||
[72] = tic_key_unknown,
|
||||
|
|
|
@ -795,7 +795,7 @@ static s32 lua_key(lua_State* lua)
|
|||
{
|
||||
tic_key key = getLuaNumber(lua, 1);
|
||||
|
||||
if(key < tic_keys_count)
|
||||
if(key < tic_key_escape)
|
||||
lua_pushboolean(lua, tic->api.key(tic, key));
|
||||
else
|
||||
{
|
||||
|
@ -827,7 +827,7 @@ static s32 lua_keyp(lua_State* lua)
|
|||
{
|
||||
tic_key key = getLuaNumber(lua, 1);
|
||||
|
||||
if(key >= tic_keys_count)
|
||||
if(key >= tic_key_escape)
|
||||
{
|
||||
luaL_error(lua, "unknown keyboard code\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue