mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-10 18:29:44 +00:00
fix for misaligned rows in screen buffer in VOSF full screen mode when screen buffer has slack and source doesn't
(cherry picked from commit cbca0b629f7b4fab0038a0d45c15a302c3216763)
This commit is contained in:
parent
c044312b3c
commit
85da18e38f
@ -597,8 +597,8 @@ static void update_display_dga_vosf(VIDEO_DRV_DGA_INIT)
|
||||
const uint32 n_pixels_left = VIDEO_MODE_X - (n_chunks * n_pixels);
|
||||
const uint32 src_chunk_size = get_chunk_size_for_depth(VIDEO_MODE_DEPTH, n_pixels);
|
||||
const uint32 dst_chunk_size = get_chunk_size_for_depth(DepthModeForPixelDepth(VIDEO_DRV_DEPTH), n_pixels);
|
||||
assert(src_chunk_size <= src_bytes_per_row);
|
||||
assert(dst_chunk_size <= dst_bytes_per_row);
|
||||
assert(src_chunk_size * n_chunks <= src_bytes_per_row);
|
||||
assert(dst_chunk_size * n_chunks <= dst_bytes_per_row);
|
||||
const uint32 src_chunk_size_left = src_bytes_per_row - (n_chunks * src_chunk_size);
|
||||
const uint32 dst_chunk_size_left = dst_bytes_per_row - (n_chunks * dst_chunk_size);
|
||||
|
||||
@ -666,8 +666,6 @@ static void update_display_dga_vosf(VIDEO_DRV_DGA_INIT)
|
||||
memcpy(the_buffer_copy + i1, the_buffer + i1, src_chunk_size_left);
|
||||
Screen_blit(the_host_buffer + i2, the_buffer + i1, src_chunk_size_left);
|
||||
}
|
||||
i1 += src_chunk_size_left;
|
||||
i2 += dst_chunk_size_left;
|
||||
#ifdef USE_SDL_VIDEO
|
||||
const int x = n_chunks * n_pixels;
|
||||
if (x < bb[bbi].x) {
|
||||
@ -681,7 +679,8 @@ static void update_display_dga_vosf(VIDEO_DRV_DGA_INIT)
|
||||
bb[bbi].w = x + n_pixels_left - bb[bbi].x;
|
||||
#endif
|
||||
}
|
||||
i2 += scr_bytes_left;
|
||||
i1 += src_chunk_size_left;
|
||||
i2 += dst_chunk_size_left + scr_bytes_left;
|
||||
#ifdef USE_SDL_VIDEO
|
||||
bb[bbi].h++;
|
||||
if (bb[bbi].w && (j == y1 || j == y2 - 1 || j == y2)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user