mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 09:09:29 +01:00
iOS: Feed the gyroscope into tilt input
Same as Android: rotation rates go to NativeGyroscope, and SYSPROP_HAS_GYRO shows the "Use gyroscope" option. Accelerometer data is now scaled from g to m/s^2, like Android's. Tilt normalizes it, but the gyro fusion only trusts the accelerometer when it reads about 9.81, so in g it would never correct drift. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3647b9e8a4
commit
cdf9d38dca
5 files changed
+42
-1
No files matched your search
@@ -66,6 +66,7 @@ void NativeResized();
|
||||
void NativeTouch(const TouchInput &touch);
|
||||
bool NativeKey(const KeyInput &key);
|
||||
void NativeAxis(const AxisInput *axis, size_t count);
|
||||
// In m/s^2, the way Android reports it: about +9.81 on z with the device lying screen up.
|
||||
void NativeAccelerometer(float tiltX, float tiltY, float tiltZ);
|
||||
// Angular rates in rad/s around the NativeAccelerometer axes. The timestamp is in seconds, on any clock (only deltas are used).
|
||||
void NativeGyroscope(float x, float y, float z, double timestamp);
|
||||
|
||||
Reference in new issue
Block a user