Skip to content

Update graphics_fbdev.cpp #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: android-8.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion minuitwrp/graphics_fbdev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ static GRSurface* fbdev_init(minui_backend* backend) {
vi.xres_virtual = fi.line_length / gr_framebuffer[0].pixel_bytes;
#endif
gr_framebuffer[0].data = reinterpret_cast<uint8_t*>(bits);
#if defined(RECOVERY_RGBX)
printf("setting GGL_PIXEL_FORMAT_RGBX_8888\n");
gr_framebuffer[0].format = GGL_PIXEL_FORMAT_RGBX_8888;
#else
if (vi.bits_per_pixel == 16) {
printf("setting GGL_PIXEL_FORMAT_RGB_565\n");
gr_framebuffer[0].format = GGL_PIXEL_FORMAT_RGB_565;
Expand All @@ -227,7 +231,7 @@ static GRSurface* fbdev_init(minui_backend* backend) {
gr_framebuffer[0].format = GGL_PIXEL_FORMAT_RGB_565;
}
}

#endif
// Drawing directly to the framebuffer takes about 5 times longer.
// Instead, we will allocate some memory and draw to that, then
// memcpy the data into the framebuffer later.
Expand Down