summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_windows.cpp')
-rw-r--r--plugins/MirLua/src/m_windows.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/MirLua/src/m_windows.cpp b/plugins/MirLua/src/m_windows.cpp
index b78f9f7278..160f632974 100644
--- a/plugins/MirLua/src/m_windows.cpp
+++ b/plugins/MirLua/src/m_windows.cpp
@@ -147,7 +147,7 @@ static int lua_FindIterator(lua_State *L)
static int lua_Find(lua_State *L)
{
- TCHAR* path = mir_utf8decodeT(luaL_checkstring(L, 1));
+ TCHAR *path = mir_utf8decodeT(luaL_checkstring(L, 1));
lua_pushlightuserdata(L, NULL);
lua_pushlightuserdata(L, path);
@@ -156,6 +156,16 @@ static int lua_Find(lua_State *L)
return 1;
}
+static int lua_GetKeyState(lua_State *L)
+{
+ int vKey = luaL_checkinteger(L, 1);
+
+ int res = GetKeyState(vKey);
+ lua_pushinteger(L, res);
+
+ return 1;
+}
+
static int lua_GetIniValue(lua_State *L)
{
ptrT path(mir_utf8decodeT(luaL_checkstring(L, 1)));
@@ -358,6 +368,8 @@ static luaL_Reg winApi[] =
{ "Find", lua_Find },
+ { "GetKeyState", lua_GetKeyState },
+
{ "GetIniValue", lua_GetIniValue },
{ "SetIniValue", lua_SetIniValue },
{ "DeleteIniValue", lua_DeleteIniValue },