diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-12-14 20:37:32 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-12-14 20:37:32 +0000 |
commit | 2b962e1ce27336c7ce3a028a8b5f58f8b3a79e78 (patch) | |
tree | 40c53728ed43985b4a76131e881d1f9536b6bd95 /plugins/MirLua/src/m_windows.cpp | |
parent | 31df706da55782980a13328303da309bd4c38ad5 (diff) |
MirLua: minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15863 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_windows.cpp')
-rw-r--r-- | plugins/MirLua/src/m_windows.cpp | 14 |
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 },
|