mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1248033 - Support GAME_ROTATION_VECTOR sensor events with no W parameter; r=snorp
This commit is contained in:
parent
0e1e26ad5a
commit
1e590abbf2
@ -432,8 +432,11 @@ public class GeckoEvent {
|
||||
break;
|
||||
|
||||
case Sensor.TYPE_ROTATION_VECTOR:
|
||||
case Sensor.TYPE_GAME_ROTATION_VECTOR: // API >= 18
|
||||
event = GeckoEvent.get(NativeGeckoEvent.SENSOR_EVENT);
|
||||
event.mFlags = GeckoHalDefines.SENSOR_ROTATION_VECTOR;
|
||||
event.mFlags = (sensor_type == Sensor.TYPE_ROTATION_VECTOR ?
|
||||
GeckoHalDefines.SENSOR_ROTATION_VECTOR :
|
||||
GeckoHalDefines.SENSOR_GAME_ROTATION_VECTOR);
|
||||
event.mMetaState = HalSensorAccuracyFor(s.accuracy);
|
||||
event.mX = s.values[0];
|
||||
event.mY = s.values[1];
|
||||
@ -448,17 +451,6 @@ public class GeckoEvent {
|
||||
event.mW = (event.mW > 0.0) ? Math.sqrt(event.mW) : 0.0;
|
||||
}
|
||||
break;
|
||||
|
||||
// case Sensor.TYPE_GAME_ROTATION_VECTOR: // API >= 18
|
||||
case 15:
|
||||
event = GeckoEvent.get(NativeGeckoEvent.SENSOR_EVENT);
|
||||
event.mFlags = GeckoHalDefines.SENSOR_GAME_ROTATION_VECTOR;
|
||||
event.mMetaState = HalSensorAccuracyFor(s.accuracy);
|
||||
event.mX = s.values[0];
|
||||
event.mY = s.values[1];
|
||||
event.mZ = s.values[2];
|
||||
event.mW = s.values[3];
|
||||
break;
|
||||
}
|
||||
return event;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user