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

Comparing BasiliskII/src/Unix/video_x.cpp (file contents):
Revision 1.70 by cebix, 2004-01-12T15:29:25Z vs.
Revision 1.71 by gbeauche, 2004-06-23T14:30:48Z

# Line 62 | Line 62
62   #include "prefs.h"
63   #include "user_strings.h"
64   #include "video.h"
65 + #include "video_blit.h"
66  
67   #define DEBUG 0
68   #include "debug.h"
# Line 122 | Line 123 | static bool use_keycodes = false;                                      //
123   static int keycode_table[256];                                          // X keycode -> Mac keycode translation table
124  
125   // X11 variables
126 + char *x_display_name = NULL;                                            // X11 display name
127 + Display *x_display = NULL;                                                      // X11 display handle
128   static int screen;                                                                      // Screen number
129   static Window rootwin;                                                          // Root window and our window
130   static int num_depths = 0;                                                      // Number of available X depths
# Line 131 | Line 134 | static unsigned long black_pixel, white_
134   static int eventmask;
135  
136   static int xdepth;                                                                      // Depth of X screen
137 + static VisualFormat visualFormat;
138   static XVisualInfo visualInfo;
139   static Visual *vis;
140   static int color_class;
# Line 754 | Line 758 | driver_window::driver_window(X11_monitor
758          native_byte_order = (XImageByteOrder(x_display) == LSBFirst);
759   #endif
760   #ifdef ENABLE_VOSF
761 <        Screen_blitter_init(&visualInfo, native_byte_order, depth_of_video_mode(mode));
761 >        Screen_blitter_init(visualFormat, native_byte_order, depth_of_video_mode(mode));
762   #endif
763  
764          // Set frame buffer base
# Line 1115 | Line 1119 | driver_fbdev::driver_fbdev(X11_monitor_d
1119   #if REAL_ADDRESSING || DIRECT_ADDRESSING
1120          // Screen_blitter_init() returns TRUE if VOSF is mandatory
1121          // i.e. the framebuffer update function is not Blit_Copy_Raw
1122 <        use_vosf = Screen_blitter_init(&visualInfo, true, mode.depth);
1122 >        use_vosf = Screen_blitter_init(visualFormat, true, mode.depth);
1123          
1124          if (use_vosf) {
1125            // Allocate memory for frame buffer (SIZE is extended to page-boundary)
# Line 1255 | Line 1259 | driver_xf86dga::driver_xf86dga(X11_monit
1259   #if REAL_ADDRESSING || DIRECT_ADDRESSING
1260          // Screen_blitter_init() returns TRUE if VOSF is mandatory
1261          // i.e. the framebuffer update function is not Blit_Copy_Raw
1262 <        use_vosf = Screen_blitter_init(&visualInfo, native_byte_order, depth_of_video_mode(mode));
1262 >        use_vosf = Screen_blitter_init(visualFormat, native_byte_order, depth_of_video_mode(mode));
1263          
1264          if (use_vosf) {
1265            // Allocate memory for frame buffer (SIZE is extended to page-boundary)
# Line 1397 | Line 1401 | bool X11_monitor_desc::video_open(void)
1401                  return false;
1402          }
1403  
1404 +        // Build up visualFormat structure
1405 +        visualFormat.depth = visualInfo.depth;
1406 +        visualFormat.Rmask = visualInfo.red_mask;
1407 +        visualFormat.Gmask = visualInfo.green_mask;
1408 +        visualFormat.Bmask = visualInfo.blue_mask;
1409 +
1410          // Create color maps
1411          if (color_class == PseudoColor || color_class == DirectColor) {
1412                  cmap[0] = XCreateColormap(x_display, rootwin, vis, AllocAll);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines