if (brightness_off == val) {
return;
}
-
brightness_off = val;
+ if (brightness_image) {
+ pixman_image_unref(brightness_image);
+ }
+ level_color.alpha = 0xFF << 8;
+ brightness_image = pixman_image_create_solid_fill(&level_color);
#ifdef TARGET_ARM
graphic_hw_invalidate(NULL);
overlay1_width, overlay1_height);
}
/* apply the brightness level */
- if (brightness_level < BRIGHTNESS_MAX) {
+ if (brightness_off || (brightness_level < BRIGHTNESS_MAX)) {
pixman_image_composite(PIXMAN_OP_OVER,
brightness_image, NULL, dst_image,
0, 0, 0, 0, 0, 0,
true);
pthread_mutex_unlock(&sdl_mutex);
+ graphic_hw_invalidate(NULL);
sdl_skip_update = 0;
sdl_skip_count = 0;
break;
When the LCD is turned off,
ten more updates the screen for a black screen. */
if (brightness_off) {
- dpy_gfx_update(dcl->con, 0, 0, 0, 0);
+ qemu_ds_sdl_update(NULL, 0, 0, 0, 0);
if (++sdl_skip_count > 10) {
sdl_skip_update = 1;
} else {
sdl_skip_update = 0;
}
} else {
- graphic_hw_update(dcl->con);
+ graphic_hw_update(NULL);
sdl_skip_count = 0;
sdl_skip_update = 0;
}
overlay1_width, overlay1_height);
}
/* apply the brightness level */
- if (brightness_level < BRIGHTNESS_MAX) {
+ if (brightness_off || (brightness_level < BRIGHTNESS_MAX)) {
pixman_image_composite(PIXMAN_OP_OVER,
brightness_image, NULL, shm_surface->image,
0, 0, 0, 0, 0, 0,
But when the display is turned off,
ten more updates the surface for a black screen. */
if (brightness_off) {
- dpy_gfx_update(dcl->con, 0, 0, 0, 0);
+ qemu_ds_shm_update(NULL, 0, 0, 0, 0);
if (++shm_skip_count > 10) {
shm_skip_update = 1;
} else {
shm_skip_update = 0;
}
} else {
- graphic_hw_update(dcl->con);
+ graphic_hw_update(NULL);
shm_skip_count = 0;
shm_skip_update = 0;
}