SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Sensor API: allow specifying update rate

Open slime73 opened this issue 2 years ago • 1 comments

Sensor update rates can affect battery life on phones, and different apps/games might have different ideal sensor update rates depending on what they do with the data and what their target framerate is.

iOS and Android both support setting an update rate, I'm not familiar with other platforms though. On iOS at least it can be set per sensor type. There's a FIXME comment in the Android sensor code which suggests adding a hint for this feature, but since SDL3 is coming up I think it should be integrated into the sensor APIs directly instead (either in the Open functions or as its own API?)

Related: https://github.com/libsdl-org/SDL/issues/3606

slime73 avatar Nov 19 '22 13:11 slime73