overlay_convert, p96_rgbx16_ovl);
y += my;
}
- vidinfo->full_refresh = 1;
}
void fb_copyrow(int monid, uae_u8 *src, uae_u8 *dst, int x, int y, int width, int srcpixbytes, int dy)
int miny = pheight - 1;
int flushlines = 0, matchcount = 0;
struct picasso_vidbuf_description *vidinfo = &picasso_vidinfo[monid];
+ bool overlay_updated = false;
src_start = src + (off & ~gwwpagemask[index]);
src_end = src + ((off + state->BytesPerRow * pheight + gwwpagesize[index] - 1) & ~gwwpagemask[index]);
#if 0
- write_log (_T("%dx%d %dx%d %dx%d (%dx%d)\n"), state->Width, state->Width,
+ write_log(_T("%dx%d %dx%d %dx%d (%dx%d)\n"), state->Width, state->Width,
state->VirtualWidth, state->VirtualHeight,
picasso_vidinfo.width, picasso_vidinfo.height,
pwidth, pheight);
gwwcnt = 0;
- if (doskip () && p96skipmode == 1) {
+ if (doskip() && p96skipmode == 1) {
break;
}
- if (vidinfo->full_refresh < 0) {
+ if (!index && overlay_vram && overlay_active) {
+ ULONG ps;
+ gwwcnt = gwwbufsize[index];
+ uae_u8 *ovr_start = src + (overlay_vram_offset & ~gwwpagemask[index]);
+ uae_u8 *ovr_end = src + ((overlay_vram_offset + overlay_src_width * overlay_src_height * overlay_pix + gwwpagesize[index] - 1) & ~gwwpagemask[index]);
+ mman_GetWriteWatch(ovr_start, ovr_end - ovr_start, gwwbuf[index], &gwwcnt, &ps);
+ overlay_updated = gwwcnt > 0;
+ }
+
+ if (vidinfo->full_refresh < 0 || overlay_updated) {
gwwcnt = (src_end - src_start) / gwwpagesize[index] + 1;
vidinfo->full_refresh = 1;
for (int i = 0; i < gwwcnt; i++)
} else {
ULONG ps;
gwwcnt = gwwbufsize[index];
- if (mman_GetWriteWatch (src_start, src_end - src_start, gwwbuf[index], &gwwcnt, &ps))
+ if (mman_GetWriteWatch(src_start, src_end - src_start, gwwbuf[index], &gwwcnt, &ps))
break;
}
break;
dst += vidinfo->offset;
- if (doskip () && p96skipmode == 2) {
+ if (doskip() && p96skipmode == 2) {
break;
}
break;
}
- if (!index && overlay_vram && overlay_active) {
+ if (!index && overlay_vram && overlay_active && (flushlines || overlay_updated)) {
if (dst == NULL) {
dst = gfx_lock_picasso(monid, false, false);
}