love.sensor Lua API

This commit is contained in:
Miku AuahDark
2022-12-05 13:57:39 +08:00
parent 8f7eac4fde
commit 332b8d01ac
3 changed files with 99 additions and 0 deletions
+5
View File
@@ -44,6 +44,11 @@ Sensor::~Sensor()
SDL_QuitSubSystem(SDL_INIT_SENSOR);
}
const char *Sensor::getName() const
{
return "love.sensor.sdl";
}
bool Sensor::isAvailable(SensorType type)
{
for (int i = 0; i < SDL_NumSensors(); i++)