[FEAT] cnt() i rst()
This commit is contained in:
13
lua.cpp
13
lua.cpp
@@ -392,6 +392,16 @@ extern "C" {
|
||||
lua_pushstring(L, fromclipboard());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cpp_cnt(lua_State *L) {
|
||||
lua_pushinteger(L, cnt());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cpp_rst(lua_State *L) {
|
||||
rst();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#define STATE_STOPPED 0
|
||||
@@ -485,6 +495,9 @@ void lua_init(const char* filename, const bool start_playing) {
|
||||
lua_pushcfunction(L,cpp_toclipboard); lua_setglobal(L, "toclipboard");
|
||||
lua_pushcfunction(L,cpp_fromclipboard); lua_setglobal(L, "fromclipboard");
|
||||
|
||||
lua_pushcfunction(L,cpp_cnt); lua_setglobal(L, "cnt");
|
||||
lua_pushcfunction(L,cpp_rst); lua_setglobal(L, "rst");
|
||||
|
||||
lua_pushinteger(L, 0); lua_setglobal(L, "KEY_UNKNOWN");
|
||||
lua_pushinteger(L, 4); lua_setglobal(L, "KEY_A");
|
||||
lua_pushinteger(L, 5); lua_setglobal(L, "KEY_B");
|
||||
|
||||
Reference in New Issue
Block a user