340 |
|
int ndepths, max_depth(0); |
341 |
|
int *depths = XListDepths(x_display, screen, &ndepths); |
342 |
|
if (depths == NULL) { |
343 |
< |
fprintf(stderr, "Error: could not determine the maximal depth available\n"); |
343 |
> |
printf("FATAL: Could not determine the maximal depth available\n"); |
344 |
|
return false; |
345 |
|
} else { |
346 |
|
while (ndepths-- > 0) { |
429 |
|
|
430 |
|
// Set colormap |
431 |
|
if (depth == 8) { |
432 |
< |
XSetWindowColormap(x_display, the_win, cmap[current_dga_cmap = 0]); |
432 |
> |
XSetWindowColormap(x_display, the_win, cmap[0]); |
433 |
|
XSetWMColormapWindows(x_display, the_win, &the_win, 1); |
434 |
|
} |
435 |
|
|
465 |
|
#else |
466 |
|
VideoMonitor.mac_frame_base = MacFrameBaseMac; |
467 |
|
#endif |
468 |
– |
|
469 |
– |
printf("FbDev DGA with %s in %d-bit mode enabled\n", fb_name, fb_depth); |
468 |
|
return true; |
469 |
|
#else |
470 |
|
ErrorAlert("Basilisk II has been compiled with fbdev DGA support disabled."); |
946 |
|
#if ENABLE_XF86_DGA |
947 |
|
XF86DGAInstallColormap(x_display, screen, cmap[current_dga_cmap]); |
948 |
|
#endif |
951 |
– |
#if ENABLE_FBDEV_DGA |
952 |
– |
XSetWindowColormap(x_display, the_win, cmap[current_dga_cmap]); |
953 |
– |
#endif |
949 |
|
|
950 |
|
// Unlock frame buffer (and continue MacOS thread) |
951 |
|
pthread_mutex_unlock(&frame_buffer_lock); |
1412 |
|
XF86DGAInstallColormap(x_display, screen, cmap[current_dga_cmap]); |
1413 |
|
} |
1414 |
|
#endif |
1420 |
– |
|
1421 |
– |
#if ENABLE_FBDEV_DGA |
1422 |
– |
if (display_type == DISPLAY_DGA) |
1423 |
– |
XSetWindowColormap(x_display, the_win, cmap[current_dga_cmap]); |
1424 |
– |
#endif |
1415 |
|
} |
1416 |
|
} |
1417 |
|
pthread_mutex_unlock(&palette_lock); |