6 Commits

Author SHA1 Message Date
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
twinaphex
a49b5b7129 Cleanups 2020-07-24 22:23:52 +02:00
gblues
6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex
96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
twinaphex
347a18cb30 Update input headers 2016-01-10 04:33:01 +01:00
twinaphex
03b1f36af1 Move linux_common to input/common/ 2015-11-17 06:46:32 +01:00