From 8882d2ff2c4c77c08a5c5b0931a70ff906ecbdb5 Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 29 Nov 2023 19:52:47 +0200 Subject: Platform web. --- src/platforms/core_desktop.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/platforms/core_desktop.c') diff --git a/src/platforms/core_desktop.c b/src/platforms/core_desktop.c index 614062d..d2c595e 100644 --- a/src/platforms/core_desktop.c +++ b/src/platforms/core_desktop.c @@ -3,7 +3,7 @@ #include "core.h" #include "platforms/core_desktop.h" -static void platformDefineGlobals() { +void platformDefineGlobals() { lua_State *L = state->luaState; lua_getglobal( L, "RL" ); @@ -87,17 +87,6 @@ int lcoreGetKeyScancode( lua_State *L ) { return 1; } -static void luaPlatformRegister() { - lua_State *L = state->luaState; - lua_getglobal( L, "RL" ); - - /* Input-related functions: keyboard. */ - assingGlobalFunction( "GetKeyName", lcoreGetKeyName ); - assingGlobalFunction( "GetKeyScancode", lcoreGetKeyScancode ); - - lua_pop( L, -1 ); -} - /* Events. */ /* @@ -649,3 +638,16 @@ static void platformRegisterEvents() { // state->glfwtabletCursorCallback = glfwSetPenTabletCursorCallback( penTabletCursorEvent ); // state->glfwtabletProximityCallback = glfwSetPenTabletProximityCallback( penTabletProximityEvent ); } + +void luaPlatformRegister() { + lua_State *L = state->luaState; + lua_getglobal( L, "RL" ); + + /* Input-related functions: keyboard. */ + assingGlobalFunction( "GetKeyName", lcoreGetKeyName ); + assingGlobalFunction( "GetKeyScancode", lcoreGetKeyScancode ); + + lua_pop( L, -1 ); + + platformRegisterEvents(); +} -- cgit v1.2.3