mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-31 03:26:47 +01:00
Blackberry tablets have reversed accelerometer values (y = x) due to their landscape affinity. The only Blackberry tablet is also the only device with 1024 pixel width, so check for this as it is easier than looking up machine ID.
This commit is contained in:
1 parent
9c96dcea91
commit
bd7bee5a11
1 file changed
+9
-1
@@ -473,7 +473,15 @@ int main(int argc, char *argv[]) {
|
||||
// Handle accelerometer
|
||||
double x, y, z;
|
||||
accelerometer_read_forces(&x, &y, &z);
|
||||
input_state.acc.x = x; input_state.acc.y = y; input_state.acc.z = z;
|
||||
if (pixel_xres == 1024) // Playbook has this reversed
|
||||
{
|
||||
input_state.acc.x = y;
|
||||
input_state.acc.y = x;
|
||||
} else {
|
||||
input_state.acc.x = x;
|
||||
input_state.acc.y = y;
|
||||
}
|
||||
input_state.acc.z = z;
|
||||
UpdateInputState(&input_state);
|
||||
NativeUpdate(input_state);
|
||||
EndInputState(&input_state);
|
||||
|
||||
Reference in new issue
Block a user