minui: fix screen update issue
yres_virtual value is set incorrectly, causing serveral images to be skipped. Change this value according to the number of buffers to fix this issue. from: codeaurora.org minui: Display the battery charging image correctly commit: 581a4dead6b96579a13ff22e2454c1f329731679 Change-Id: I10f5d1c6cc37705f0287c7dd517082de2e11d264 Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
parent
69f4b6732c
commit
862d026fb2
1 changed files with 4 additions and 2 deletions
|
@ -44,6 +44,8 @@
|
|||
#define PIXEL_SIZE 2
|
||||
#endif
|
||||
|
||||
#define NUM_BUFFERS 2
|
||||
|
||||
typedef struct {
|
||||
GGLSurface texture;
|
||||
unsigned cwidth;
|
||||
|
@ -54,7 +56,7 @@ typedef struct {
|
|||
static GRFont *gr_font = 0;
|
||||
static GGLContext *gr_context = 0;
|
||||
static GGLSurface gr_font_texture;
|
||||
static GGLSurface gr_framebuffer[2];
|
||||
static GGLSurface gr_framebuffer[NUM_BUFFERS];
|
||||
static GGLSurface gr_mem_surface;
|
||||
static unsigned gr_active_fb = 0;
|
||||
|
||||
|
@ -162,7 +164,7 @@ static void get_memory_surface(GGLSurface* ms) {
|
|||
static void set_active_framebuffer(unsigned n)
|
||||
{
|
||||
if (n > 1) return;
|
||||
vi.yres_virtual = vi.yres * PIXEL_SIZE;
|
||||
vi.yres_virtual = vi.yres * NUM_BUFFERS;
|
||||
vi.yoffset = n * vi.yres;
|
||||
vi.bits_per_pixel = PIXEL_SIZE * 8;
|
||||
if (ioctl(gr_fb_fd, FBIOPUT_VSCREENINFO, &vi) < 0) {
|
||||
|
|
Loading…
Reference in a new issue