ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/video_vosf.h
(Generate patch)

Comparing BasiliskII/src/Unix/video_vosf.h (file contents):
Revision 1.22 by cebix, 2001-07-01T14:38:03Z vs.
Revision 1.23 by cebix, 2001-07-01T19:57:55Z

# Line 281 | Line 281 | static bool screen_fault_handler(sigsegv
281   // From video_blit.cpp
282   extern void (*Screen_blit)(uint8 * dest, const uint8 * source, uint32 length);
283   extern bool Screen_blitter_init(XVisualInfo * visual_info, bool native_byte_order, video_depth mac_depth);
284 + extern uint32 ExpandMap[256];
285  
286   /*      How can we deal with array overrun conditions ?
287          
# Line 336 | Line 337 | static inline void update_display_window
337                  const int y2 = mainBuffer.pageInfo[page - 1].bottom;
338                  const int height = y2 - y1 + 1;
339                  
339                const int bytes_per_row = VideoMonitor.mode.bytes_per_row;
340                const int bytes_per_pixel = VideoMonitor.mode.bytes_per_row / VideoMonitor.mode.x;
341                int i = y1 * bytes_per_row, j;
342                
340                  if (VideoMonitor.mode.depth == VDEPTH_1BIT) {
341  
342                          // Update the_host_buffer and copy of the_buffer
343 +                        const int bytes_per_row = VideoMonitor.mode.bytes_per_row;
344 +                        int i = y1 * bytes_per_row, j;
345                          for (j = y1; j <= y2; j++) {
346                                  Screen_blit(the_host_buffer + i, the_buffer + i, VideoMonitor.mode.x >> 3);
347                                  i += bytes_per_row;
# Line 351 | Line 350 | static inline void update_display_window
350                  } else {
351  
352                          // Update the_host_buffer and copy of the_buffer
353 +                        const int src_bytes_per_row = VideoMonitor.mode.bytes_per_row;
354 +                        const int dst_bytes_per_row = drv->img->bytes_per_line;
355 +                        const int bytes_per_pixel = src_bytes_per_row / VideoMonitor.mode.x;
356 +                        int i1 = y1 * src_bytes_per_row, i2 = y1 * dst_bytes_per_row, j;
357                          for (j = y1; j <= y2; j++) {
358 <                                Screen_blit(the_host_buffer + i, the_buffer + i, bytes_per_pixel * VideoMonitor.mode.x);
359 <                                i += bytes_per_row;
358 >                                Screen_blit(the_host_buffer + i2, the_buffer + i1, bytes_per_pixel * VideoMonitor.mode.x);
359 >                                i1 += src_bytes_per_row;
360 >                                i2 += dst_bytes_per_row;
361                          }
362                  }
363  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines