mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-25 17:20:47 +02:00
another fix for lua key events
This commit is contained in:
@@ -457,7 +457,7 @@ int luacon_keyevent(int key, Uint16 character, int modifier, int event)
|
|||||||
for (int i = 1; i <= len && kycontinue; i++)
|
for (int i = 1; i <= len && kycontinue; i++)
|
||||||
{
|
{
|
||||||
lua_rawgeti(l, -1, i);
|
lua_rawgeti(l, -1, i);
|
||||||
if ((modifier & KEY_MOD_CONTROL) && (character < ' ' || character > '~'))
|
if ((modifier & KEY_MOD_CONTROL) && (character < ' ' || character > '~') && key < 256)
|
||||||
lua_pushlstring(l, (const char*)&key, 1);
|
lua_pushlstring(l, (const char*)&key, 1);
|
||||||
else
|
else
|
||||||
lua_pushlstring(l, (const char*)&character, 1);
|
lua_pushlstring(l, (const char*)&character, 1);
|
||||||
|
Reference in New Issue
Block a user