73 |
|
|
74 |
|
// Prototypes |
75 |
|
static void vosf_do_set_dirty_area(uintptr first, uintptr last); |
76 |
< |
static void vosf_set_dirty_area(int x, int y, int w, int h, int screen_width, int bytes_per_row); |
76 |
> |
static void vosf_set_dirty_area(int x, int y, int w, int h, int screen_width, int screen_height, int bytes_per_row); |
77 |
|
|
78 |
|
// Variables for Video on SEGV support |
79 |
|
static uint8 *the_host_buffer; // Host frame buffer in VOSF mode |
356 |
|
} |
357 |
|
} |
358 |
|
|
359 |
< |
static void vosf_set_dirty_area(int x, int y, int w, int h, int screen_width, int bytes_per_row) |
359 |
> |
static void vosf_set_dirty_area(int x, int y, int w, int h, int screen_width, int screen_height, int bytes_per_row) |
360 |
|
{ |
361 |
|
if (x < 0) { |
362 |
|
w -= -x; |
368 |
|
} |
369 |
|
if (w <= 0 || h <= 0) |
370 |
|
return; |
371 |
+ |
if (x + w > screen_width) |
372 |
+ |
w -= (x + w) - screen_width; |
373 |
+ |
if (y + h > screen_height) |
374 |
+ |
h -= (y + h) - screen_height; |
375 |
|
LOCK_VOSF; |
376 |
|
if (bytes_per_row >= screen_width) { |
377 |
|
const int bytes_per_pixel = bytes_per_row / screen_width; |