ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/video_x.cpp
(Generate patch)

Comparing SheepShaver/src/Unix/video_x.cpp (file contents):
Revision 1.29 by gbeauche, 2004-06-22T20:01:18Z vs.
Revision 1.30 by gbeauche, 2004-06-23T14:41:49Z

# Line 46 | Line 46
46   #include "about_window.h"
47   #include "video.h"
48   #include "video_defs.h"
49 + #include "video_blit.h"
50  
51   #define DEBUG 0
52   #include "debug.h"
# Line 101 | Line 102 | static int depth;                                                      // Depth of Mac
102   static Window rootwin, the_win;                         // Root window and our window
103   static int num_depths = 0;                                      // Number of available X depths
104   static int *avail_depths = NULL;                        // List of available X depths
105 + static VisualFormat visualFormat;
106   static XVisualInfo visualInfo;
107   static Visual *vis;
108   static int color_class;
# Line 540 | Line 542 | static bool open_window(int width, int h
542          native_byte_order = (XImageByteOrder(x_display) == LSBFirst);
543   #endif
544   #ifdef ENABLE_VOSF
545 <        Screen_blitter_init(&visualInfo, native_byte_order, depth);
545 >        Screen_blitter_init(visualFormat, native_byte_order, depth);
546   #endif
547  
548          // Set bytes per row
# Line 614 | Line 616 | static bool open_dga(int width, int heig
616   #if REAL_ADDRESSING || DIRECT_ADDRESSING
617          // Screen_blitter_init() returns TRUE if VOSF is mandatory
618          // i.e. the framebuffer update function is not Blit_Copy_Raw
619 <        use_vosf = Screen_blitter_init(&visualInfo, native_byte_order, depth);
619 >        use_vosf = Screen_blitter_init(visualFormat, native_byte_order, depth);
620          
621          if (use_vosf) {
622            // Allocate memory for frame buffer (SIZE is extended to page-boundary)
# Line 651 | Line 653 | static bool open_display(void)
653                  return false;
654          }
655  
656 +        // Build up visualFormat structure
657 +        visualFormat.depth = visualInfo.depth;
658 +        visualFormat.Rmask = visualInfo.red_mask;
659 +        visualFormat.Gmask = visualInfo.green_mask;
660 +        visualFormat.Bmask = visualInfo.blue_mask;
661 +
662          // Create color maps
663          if (color_class == PseudoColor || color_class == DirectColor) {
664                  cmap[0] = XCreateColormap(x_display, rootwin, vis, AllocAll);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines