- [NEW] system.fps()

This commit is contained in:
2025-05-30 17:43:43 +02:00
parent 3d14c33971
commit b6e5dca277
3 changed files with 20 additions and 1 deletions

View File

@@ -670,6 +670,11 @@ extern "C" {
return 0;
}
static int cpp_sys_fps(lua_State *L) {
lua_pushnumber(L, getfps());
return 1;
}
// win
// ===============================================
@@ -922,6 +927,7 @@ void push_lua_funcs() {
lua_pushcfunction(L,cpp_sys_updateTimeout); lua_setfield(L, -2, "updateOnEventsAndTimeout");
lua_pushcfunction(L,cpp_sys_dir); lua_setfield(L, -2, "getFilesInDataDirectory");
lua_pushcfunction(L,cpp_sys_exit); lua_setfield(L, -2, "quit");
lua_pushcfunction(L,cpp_sys_fps); lua_setfield(L, -2, "fps");
lua_setglobal(L, "system");
lua_newtable(L);