Skip to content

Commit

Permalink
Add BOARD_HAS_JANKY_BACKBUFFER for terrible Galaxy Tabs.
Browse files Browse the repository at this point in the history
Change-Id: I72e7a8aaf65c97d4cd2b77ff92cf7232f8c9e7a7
  • Loading branch information
koush committed Dec 19, 2010
1 parent 9765a03 commit 4995114
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions minui/Android.mk
Expand Up @@ -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)
4 changes: 4 additions & 0 deletions minui/graphics.c
Expand Up @@ -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);

Expand Down
16 changes: 16 additions & 0 deletions roots.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4995114

Please sign in to comment.