summaryrefslogtreecommitdiffstats
path: root/minuitwrp/graphics_overlay.cpp
diff options
context:
space:
mode:
authorVladimir Oltean <olteanv@gmail.com>2018-07-02 23:04:03 +0200
committerEthan Yonker <dees_troy@teamw.in>2019-03-18 17:39:38 +0100
commitd32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5 (patch)
treeb61769e4756a3500a7ccc1fe9399b7de0af4d47c /minuitwrp/graphics_overlay.cpp
parentAB/Non AB Devices: updates for moving cache (diff)
downloadandroid_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.gz
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.bz2
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.lz
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.xz
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.zst
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.zip
Diffstat (limited to 'minuitwrp/graphics_overlay.cpp')
-rw-r--r--minuitwrp/graphics_overlay.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/minuitwrp/graphics_overlay.cpp b/minuitwrp/graphics_overlay.cpp
index b4efae421..4dff7f4a6 100644
--- a/minuitwrp/graphics_overlay.cpp
+++ b/minuitwrp/graphics_overlay.cpp
@@ -323,9 +323,13 @@ int allocate_overlay(int fd, GRSurface gr_fb)
overlayL.dst_rect.w = gr_fb.width;
overlayL.dst_rect.h = gr_fb.height;
overlayL.alpha = 0xFF;
-#ifdef BOARD_HAS_FLIPPED_SCREEN
- overlayL.flags = MDP_ROT_180;
-#endif
+ // If this worked, life would have been so much easier
+ //switch (TW_ROTATION) {
+ //case 0: overlayL.flags = MDP_ROT_NOP; break;
+ //case 90: overlayL.flags = MDP_ROT_90; break;
+ //case 180: overlayL.flags = MDP_ROT_180; break;
+ //case 270: overlayL.flags = MDP_ROT_270; break;
+ //}
overlayL.transp_mask = MDP_TRANSP_NOP;
overlayL.id = MSMFB_NEW_REQUEST;
ret = ioctl(fd, MSMFB_OVERLAY_SET, &overlayL);
@@ -363,9 +367,13 @@ int allocate_overlay(int fd, GRSurface gr_fb)
overlayL.dst_rect.w = lWidth;
overlayL.dst_rect.h = height;
overlayL.alpha = 0xFF;
-#ifdef BOARD_HAS_FLIPPED_SCREEN
- overlayL.flags = MDP_ROT_180;
-#endif
+ // If this worked, life would have been so much easier
+ //switch (TW_ROTATION) {
+ //case 0: overlayL.flags = MDP_ROT_NOP; break;
+ //case 90: overlayL.flags = MDP_ROT_90; break;
+ //case 180: overlayL.flags = MDP_ROT_180; break;
+ //case 270: overlayL.flags = MDP_ROT_270; break;
+ //}
overlayL.transp_mask = MDP_TRANSP_NOP;
overlayL.id = MSMFB_NEW_REQUEST;
ret = ioctl(fd, MSMFB_OVERLAY_SET, &overlayL);
@@ -393,11 +401,14 @@ int allocate_overlay(int fd, GRSurface gr_fb)
overlayR.dst_rect.w = rWidth;
overlayR.dst_rect.h = height;
overlayR.alpha = 0xFF;
-#ifdef BOARD_HAS_FLIPPED_SCREEN
- overlayR.flags = MDSS_MDP_RIGHT_MIXER | MDP_ROT_180;
-#else
overlayR.flags = MDSS_MDP_RIGHT_MIXER;
-#endif
+ // If this worked, life would have been so much easier
+ //switch (TW_ROTATION) {
+ //case 0: overlayR.flags |= MDP_ROT_NOP; break;
+ //case 90: overlayR.flags |= MDP_ROT_90; break;
+ //case 180: overlayR.flags |= MDP_ROT_180; break;
+ //case 270: overlayR.flags |= MDP_ROT_270; break;
+ //}
overlayR.transp_mask = MDP_TRANSP_NOP;
overlayR.id = MSMFB_NEW_REQUEST;
ret = ioctl(fd, MSMFB_OVERLAY_SET, &overlayR);