summaryrefslogtreecommitdiffstats
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index f7a75d3..9d9b20b 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -337,6 +337,18 @@ status_t BootAnimation::readyToRun() {
status_t status = SurfaceComposerClient::getDisplayInfo(dtoken, &dinfo);
if (status)
return -1;
+ char value[PROPERTY_VALUE_MAX];
+ property_get("persist.panel.orientation", value, "0");
+ int orient = atoi(value) / 90;
+
+ if(orient == eOrientation90 || orient == eOrientation270) {
+ int temp = dinfo.h;
+ dinfo.h = dinfo.w;
+ dinfo.w = temp;
+ }
+
+ Rect destRect(dinfo.w, dinfo.h);
+ mSession->setDisplayProjection(dtoken, orient, destRect, destRect);
// create the native surface
sp<SurfaceControl> control = session()->createSurface(String8("BootAnimation"),