Platform web.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "core.h"
|
||||
#include "platforms/core_desktop_sdl.h"
|
||||
|
||||
static void platformDefineGlobals() {
|
||||
void platformDefineGlobals() {
|
||||
lua_State *L = state->luaState;
|
||||
|
||||
lua_getglobal( L, "RL" );
|
||||
@@ -111,17 +111,6 @@ int lcoreGetScancodeFromKey( 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( "GetScancodeFromKey", lcoreGetScancodeFromKey );
|
||||
|
||||
lua_pop( L, -1 );
|
||||
}
|
||||
|
||||
/* Events. */
|
||||
|
||||
/*
|
||||
@@ -555,3 +544,16 @@ Event occurs an event of type SDL_DOLLARGESTURE or SDL_DOLLARRECORD is reported.
|
||||
}
|
||||
state->SDL_eventQueueLen = 0;
|
||||
}
|
||||
|
||||
void luaPlatformRegister() {
|
||||
lua_State *L = state->luaState;
|
||||
lua_getglobal( L, "RL" );
|
||||
|
||||
/* Input-related functions: keyboard. */
|
||||
assingGlobalFunction( "GetKeyName", lcoreGetKeyName );
|
||||
assingGlobalFunction( "GetScancodeFromKey", lcoreGetScancodeFromKey );
|
||||
|
||||
lua_pop( L, -1 );
|
||||
|
||||
platformRegisterEvents()
|
||||
}
|
||||
|
||||
20
src/platforms/core_web.c
Normal file
20
src/platforms/core_web.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "main.h"
|
||||
#include "lua_core.h"
|
||||
#include "core.h"
|
||||
|
||||
void platformDefineGlobals() {
|
||||
lua_State *L = state->luaState;
|
||||
|
||||
lua_getglobal( L, "RL" );
|
||||
/*DOC_DEFINES_START*/
|
||||
/*DOC_DEFINES_END*/
|
||||
lua_pop( L, -1 );
|
||||
}
|
||||
|
||||
/* Functions. */
|
||||
|
||||
/* Events. */
|
||||
|
||||
void luaPlatformRegister() {
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user