Jesse Talavera d682917e44
Add Linux support for illuminance sensors (#17208)
* First crack at light sensor support for Linux

* Add light-sensor support to most Linux input drivers

* Fix a compiler error

- Whoops, forgot to declare `sdl`

* Refactor linux_illuminance_sensor_t

- Allow the poll rate to be specified
- Poll the sensor on a separate thread
- Open a file handle each time we poll the sensor, since sysfs doesn't update the contents of an existing handle

* Set the `done` flag when closing the light sensor

- Whoops

* Avoid a division by zero when updating the poll rate of an existing sensor

* Don't try to open illuminance sensors from ".", "..", or hidden files

* Never mind

* Fix some silly mistakes

* Skip hidden files, ".", and ".."

* Cancel the sensor poll thread mid-sleep when closing it

- POSIX says it's fine

* Add to CHANGES.md

* Address feedback given on PR

* Use libretro-common's file system instead of stdio
2024-12-17 05:49:39 -08:00
..
2024-10-01 17:36:33 -07:00
2024-10-01 17:36:33 -07:00
2024-10-01 17:36:33 -07:00
2023-06-01 22:52:05 +02:00