summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java
index 3086b2459..214d0e017 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -546,6 +546,10 @@ public class PhotoView extends GLView {
}
private int getPanoramaRotation() {
+ // Panorama only support rotations of 0 and 90, so if it is greater
+ // than that flip the output surface texture to compensate
+ if (mDisplayRotation > 180)
+ return (mCompensation + 180) % 360;
return mCompensation;
}