Add BOARD_HAS_JANKY_BACKBUFFER for terrible Galaxy Tabs.

Change-Id: I72e7a8aaf65c97d4cd2b77ff92cf7232f8c9e7a7
This commit is contained in:
Koushik Dutta 2010-12-18 21:58:43 -08:00
parent 9765a037a1
commit 4995114d38
3 changed files with 24 additions and 0 deletions

View File

@ -11,6 +11,10 @@ ifneq ($(BOARD_LDPI_RECOVERY),)
LOCAL_CFLAGS += -DBOARD_LDPI_RECOVERY='"$(BOARD_LDPI_RECOVERY)"'
endif
ifneq ($(BOARD_HAS_JANKY_BACKBUFFER),)
LOCAL_CFLAGS += -DBOARD_HAS_JANKY_BACKBUFFER
endif
LOCAL_MODULE := libminui
include $(BUILD_STATIC_LIBRARY)

View File

@ -101,7 +101,11 @@ static int get_framebuffer(GGLSurface *fb)
fb->width = vi.xres;
fb->height = vi.yres;
fb->stride = fi.line_length/2;
#ifdef BOARD_HAS_JANKY_BACKBUFFER
fb->data = (void*) (((unsigned) bits) + vi.yres * fi.line_length);
#else
fb->data = (void*) (((unsigned) bits) + vi.yres * fi.line_length / 2);
#endif
fb->format = GGL_PIXEL_FORMAT_RGB_565;
memset(fb->data, 0, vi.yres * vi.xres * 2);

16
roots.c
View File

@ -157,6 +157,22 @@ int ensure_path_mounted(const char* path) {
if (result == 0) return 0;
}
LOGE("failed to mount %s (%s)\n", v->mount_point, strerror(errno));
return -1;
} else {
// let's just give it a shot and see what happens...
result = mount(v->device, v->mount_point, v->fs_type,
MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
if (result == 0) return 0;
if (v->device2) {
LOGW("failed to mount %s (%s); trying %s\n",
v->device, strerror(errno), v->device2);
result = mount(v->device2, v->mount_point, v->fs_type,
MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
if (result == 0) return 0;
}
LOGE("failed to mount %s (%s)\n", v->mount_point, strerror(errno));
return -1;
}