diff options
Diffstat (limited to 'src/platforms/core_desktop.c')
| -rw-r--r-- | src/platforms/core_desktop.c | 26 |
1 files changed, 14 insertions, 12 deletions
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(); +} |
