mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
love.sensor Lua API
This commit is contained in:
@@ -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++)
|
||||
|
||||
@@ -43,6 +43,9 @@ public:
|
||||
Sensor();
|
||||
~Sensor() override;
|
||||
|
||||
// Implements Module.
|
||||
const char *getName() const override;
|
||||
|
||||
bool isAvailable(SensorType type) override;
|
||||
bool isEnabled(SensorType type) override;
|
||||
void setEnabled(SensorType type, bool enable) override;
|
||||
|
||||
Reference in New Issue
Block a user