add back type casting when sending event to lua stack

This commit is contained in:
Qingping Hou
2012-11-04 11:24:29 +08:00
parent c90e2ae797
commit 9fca67b6cb

View File

@@ -306,13 +306,13 @@ static int waitForInput(lua_State *L) {
if(n == sizeof(struct input_event)) {
lua_newtable(L);
lua_pushstring(L, "type");
lua_pushinteger(L, input.type);
lua_pushinteger(L, (int) input.type);
lua_settable(L, -3);
lua_pushstring(L, "code");
lua_pushinteger(L, input.code);
lua_pushinteger(L, (int) input.code);
lua_settable(L, -3);
lua_pushstring(L, "value");
lua_pushinteger(L, input.value);
lua_pushinteger(L, (int) input.value);
lua_settable(L, -3);
return 1;
} else {