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.32 by gbeauche, 2004-07-02T06:06:34Z vs.
Revision 1.34 by gbeauche, 2004-12-18T18:34:56Z

# Line 503 | Line 503 | static bool open_window(int width, int h
503          the_buffer = (uint8 *)malloc((aligned_height + 2) * img->bytes_per_line);
504          D(bug("the_buffer = %p, the_buffer_copy = %p\n", the_buffer, the_buffer_copy));
505   #endif
506 <        screen_base = (uint32)the_buffer;
506 >        screen_base = Host2MacAddr(the_buffer);
507  
508          // Create GC
509          the_gc = XCreateGC(x_display, the_win, 0, 0);
# Line 633 | Line 633 | static bool open_dga(int width, int heig
633  
634          // Set frame buffer base
635          D(bug("the_buffer = %p, use_vosf = %d\n", the_buffer, use_vosf));
636 <        screen_base = (uint32)the_buffer;
636 >        screen_base = Host2MacAddr(the_buffer);
637          VModes[cur_mode].viRowBytes = bytes_per_row;
638          return true;
639   #else
# Line 892 | Line 892 | static void keycode_init(void)
892  
893                  // Search for server vendor string, then read keycodes
894                  const char *vendor = ServerVendor(x_display);
895 #if (defined(__APPLE__) && defined(__MACH__))
895                  // Force use of MacX mappings on MacOS X with Apple's X server
896                  int dummy;
897                  if (XQueryExtension(x_display, "Apple-DRI", &dummy, &dummy, &dummy))
898                          vendor = "MacX";
900 #endif
899                  bool vendor_found = false;
900                  char line[256];
901                  while (fgets(line, 255, f)) {
# Line 1267 | Line 1265 | static void suspend_emul(void)
1265                  // Save frame buffer
1266                  fb_save = malloc(VModes[cur_mode].viYsize * VModes[cur_mode].viRowBytes);
1267                  if (fb_save)
1268 <                        memcpy(fb_save, (void *)screen_base, VModes[cur_mode].viYsize * VModes[cur_mode].viRowBytes);
1268 >                        Mac2Host_memcpy(fb_save, screen_base, VModes[cur_mode].viYsize * VModes[cur_mode].viRowBytes);
1269  
1270                  // Close full screen display
1271   #ifdef ENABLE_XF86_DGA
# Line 1329 | Line 1327 | static void resume_emul(void)
1327                  // Don't copy fb_save to the temporary frame buffer in VOSF mode
1328                  if (!use_vosf)
1329   #endif
1330 <                memcpy((void *)screen_base, fb_save, VModes[cur_mode].viYsize * VModes[cur_mode].viRowBytes);
1330 >                Host2Mac_memcpy(screen_base, fb_save, VModes[cur_mode].viYsize * VModes[cur_mode].viRowBytes);
1331                  free(fb_save);
1332                  fb_save = NULL;
1333          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines