summaryrefslogtreecommitdiff
path: root/src/platforms/core_desktop.c
diff options
context:
space:
mode:
authorjussi2023-11-29 19:52:47 +0200
committerjussi2023-11-29 19:52:47 +0200
commit8882d2ff2c4c77c08a5c5b0931a70ff906ecbdb5 (patch)
tree1ec267213ed205af75fcc02c46f45c05e01fa7bb /src/platforms/core_desktop.c
parent4ff1b1dcb9f52a2642feabda38c8c135aac6c599 (diff)
downloadreilua-enhanced-8882d2ff2c4c77c08a5c5b0931a70ff906ecbdb5.tar.gz
reilua-enhanced-8882d2ff2c4c77c08a5c5b0931a70ff906ecbdb5.tar.bz2
reilua-enhanced-8882d2ff2c4c77c08a5c5b0931a70ff906ecbdb5.zip
Platform web.
Diffstat (limited to 'src/platforms/core_desktop.c')
-rw-r--r--src/platforms/core_desktop.c26
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();
+}