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); |
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 |
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)) { |
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 |
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 |
|
} |