summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuhammad Fahad Baig <muhammad.fb.79@gmail.com>2016-04-07 10:19:33 +0200
committerDees Troy <dees_troy@teamw.in>2016-06-09 22:25:19 +0200
commit0ac2293a9e391297cfb76c0dffca50f036b74db0 (patch)
tree07234c3d4377f23afc55404b070d384546710a86
parentMove force_rgb_565 up. (diff)
downloadandroid_bootable_recovery-0ac2293a9e391297cfb76c0dffca50f036b74db0.tar
android_bootable_recovery-0ac2293a9e391297cfb76c0dffca50f036b74db0.tar.gz
android_bootable_recovery-0ac2293a9e391297cfb76c0dffca50f036b74db0.tar.bz2
android_bootable_recovery-0ac2293a9e391297cfb76c0dffca50f036b74db0.tar.lz
android_bootable_recovery-0ac2293a9e391297cfb76c0dffca50f036b74db0.tar.xz
android_bootable_recovery-0ac2293a9e391297cfb76c0dffca50f036b74db0.tar.zst
android_bootable_recovery-0ac2293a9e391297cfb76c0dffca50f036b74db0.zip
-rw-r--r--minuitwrp/Android.mk3
-rw-r--r--minuitwrp/graphics_fbdev.cpp6
2 files changed, 9 insertions, 0 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index 811685c0e..18943727d 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -137,6 +137,9 @@ endif
ifeq ($(TW_SCREEN_BLANK_ON_BOOT), true)
LOCAL_CFLAGS += -DTW_SCREEN_BLANK_ON_BOOT
endif
+ifeq ($(TW_FBIOPAN), true)
+ LOCAL_CFLAGS += -DTW_FBIOPAN
+endif
ifeq ($(BOARD_HAS_FLIPPED_SCREEN), true)
LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN
diff --git a/minuitwrp/graphics_fbdev.cpp b/minuitwrp/graphics_fbdev.cpp
index 2126cf9cb..3402cbae3 100644
--- a/minuitwrp/graphics_fbdev.cpp
+++ b/minuitwrp/graphics_fbdev.cpp
@@ -103,6 +103,12 @@ static void set_displayed_framebuffer(unsigned n)
vi.bits_per_pixel = gr_framebuffer[0].pixel_bytes * 8;
if (ioctl(fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) {
perror("active fb swap failed");
+#ifdef TW_FBIOPAN
+ } else {
+ if (ioctl(fb_fd, FBIOPAN_DISPLAY, &vi) < 0) {
+ perror("pan failed");
+ }
+#endif
}
displayed_buffer = n;
}