1288 |
|
XF86DGASetViewPort(x_display, screen, 0, 0); |
1289 |
|
#endif |
1290 |
|
XSync(x_display, false); |
1291 |
< |
|
1292 |
< |
// Restore frame buffer |
1293 |
< |
if (fb_save) { |
1294 |
< |
#if REAL_ADDRESSING || DIRECT_ADDRESSING |
1295 |
< |
if (use_vosf) |
1296 |
< |
mprotect((caddr_t)mainBuffer.memStart, mainBuffer.memLength, PROT_READ|PROT_WRITE); |
1297 |
< |
#endif |
1298 |
< |
memcpy(the_buffer, fb_save, VideoMonitor.y * VideoMonitor.bytes_per_row); |
1299 |
< |
#if REAL_ADDRESSING || DIRECT_ADDRESSING |
1300 |
< |
if (use_vosf) { |
1301 |
< |
mprotect((caddr_t)mainBuffer.memStart, mainBuffer.memLength, PROT_READ); |
1302 |
< |
do_update_framebuffer(the_host_buffer, the_buffer, VideoMonitor.x * VideoMonitor.bytes_per_row); |
1291 |
> |
|
1292 |
> |
// the_buffer already contains the data to restore. i.e. since a temporary |
1293 |
> |
// frame buffer is used when VOSF is actually used, fb_save is therefore |
1294 |
> |
// not necessary. |
1295 |
> |
#ifdef ENABLE_VOSF |
1296 |
> |
if (use_vosf) { |
1297 |
|
#ifdef HAVE_PTHREADS |
1298 |
< |
pthread_mutex_lock(&Screen_draw_lock); |
1298 |
> |
pthread_mutex_lock(&Screen_draw_lock); |
1299 |
|
#endif |
1300 |
< |
PFLAG_CLEAR_ALL; |
1300 |
> |
PFLAG_SET_ALL; |
1301 |
|
#ifdef HAVE_PTHREADS |
1302 |
< |
pthread_mutex_unlock(&Screen_draw_lock); |
1302 |
> |
pthread_mutex_unlock(&Screen_draw_lock); |
1303 |
|
#endif |
1304 |
< |
} |
1304 |
> |
memset(the_buffer_copy, 0, VideoMonitor.bytes_per_row * VideoMonitor.y); |
1305 |
> |
} |
1306 |
> |
#endif |
1307 |
> |
|
1308 |
> |
// Restore frame buffer |
1309 |
> |
if (fb_save) { |
1310 |
> |
#ifdef ENABLE_VOSF |
1311 |
> |
// Don't copy fb_save to the temporary frame buffer in VOSF mode |
1312 |
> |
if (!use_vosf) |
1313 |
|
#endif |
1314 |
+ |
memcpy(the_buffer, fb_save, VideoMonitor.y * VideoMonitor.bytes_per_row); |
1315 |
|
free(fb_save); |
1316 |
|
fb_save = NULL; |
1317 |
|
} |
1592 |
|
// Hidden parts exposed, force complete refresh of window |
1593 |
|
case Expose: |
1594 |
|
if (display_type == DISPLAY_WINDOW) { |
1592 |
– |
if (frame_skip == 0) { // Dynamic refresh |
1593 |
– |
int x1, y1; |
1594 |
– |
for (y1=0; y1<16; y1++) |
1595 |
– |
for (x1=0; x1<16; x1++) |
1596 |
– |
updt_box[x1][y1] = true; |
1597 |
– |
nr_boxes = 16 * 16; |
1598 |
– |
} else { |
1595 |
|
#ifdef ENABLE_VOSF |
1596 |
+ |
if (use_vosf) { // VOSF refresh |
1597 |
|
#ifdef HAVE_PTHREADS |
1598 |
|
pthread_mutex_lock(&Screen_draw_lock); |
1599 |
|
#endif |
1601 |
|
#ifdef HAVE_PTHREADS |
1602 |
|
pthread_mutex_unlock(&Screen_draw_lock); |
1603 |
|
#endif |
1607 |
– |
#endif |
1604 |
|
memset(the_buffer_copy, 0, VideoMonitor.bytes_per_row * VideoMonitor.y); |
1605 |
|
} |
1606 |
+ |
else |
1607 |
+ |
#endif |
1608 |
+ |
if (frame_skip == 0) { // Dynamic refresh |
1609 |
+ |
int x1, y1; |
1610 |
+ |
for (y1=0; y1<16; y1++) |
1611 |
+ |
for (x1=0; x1<16; x1++) |
1612 |
+ |
updt_box[x1][y1] = true; |
1613 |
+ |
nr_boxes = 16 * 16; |
1614 |
+ |
} else // Static refresh |
1615 |
+ |
memset(the_buffer_copy, 0, VideoMonitor.bytes_per_row * VideoMonitor.y); |
1616 |
|
} |
1617 |
|
break; |
1618 |
|
} |