diff --git a/src/common/config.h b/src/common/config.h index bea645bc8..42d3bb27d 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -159,6 +159,7 @@ # define LOVE_ENABLE_MATH # define LOVE_ENABLE_MOUSE # define LOVE_ENABLE_PHYSICS +# define LOVE_ENABLE_SENSOR # define LOVE_ENABLE_SOUND # define LOVE_ENABLE_SYSTEM # define LOVE_ENABLE_THREAD diff --git a/src/modules/love/boot.lua b/src/modules/love/boot.lua index 8eb030604..6f03ad1b8 100644 --- a/src/modules/love/boot.lua +++ b/src/modules/love/boot.lua @@ -189,6 +189,7 @@ function love.init() audio = true, math = true, physics = true, + sensor = true, sound = true, system = true, font = true, @@ -311,6 +312,7 @@ function love.init() "touch", "sound", "system", + "sensor", "audio", "image", "video", diff --git a/src/modules/love/love.cpp b/src/modules/love/love.cpp index 4c1494aa4..ba67edb93 100644 --- a/src/modules/love/love.cpp +++ b/src/modules/love/love.cpp @@ -152,6 +152,9 @@ extern "C" #if defined(LOVE_ENABLE_PHYSICS) extern int luaopen_love_physics(lua_State*); #endif +#if defined(LOVE_ENABLE_SENSOR) + extern int luaopen_love_sensor(lua_State*); +#endif #if defined(LOVE_ENABLE_SOUND) extern int luaopen_love_sound(lua_State*); #endif @@ -221,6 +224,9 @@ static const luaL_Reg modules[] = { #if defined(LOVE_ENABLE_PHYSICS) { "love.physics", luaopen_love_physics }, #endif +#if defined(LOVE_ENABLE_SENSOR) + { "love.sensor", luaopen_love_sensor }, +#endif #if defined(LOVE_ENABLE_SOUND) { "love.sound", luaopen_love_sound }, #endif