mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-11 10:30:09 +00:00
- small fixes to fbdev DGA code
This commit is contained in:
parent
d6b83e4715
commit
775ff87b31
@ -340,7 +340,7 @@ static bool init_fbdev_dga(char *in_fb_name)
|
|||||||
int ndepths, max_depth(0);
|
int ndepths, max_depth(0);
|
||||||
int *depths = XListDepths(x_display, screen, &ndepths);
|
int *depths = XListDepths(x_display, screen, &ndepths);
|
||||||
if (depths == NULL) {
|
if (depths == NULL) {
|
||||||
fprintf(stderr, "Error: could not determine the maximal depth available\n");
|
printf("FATAL: Could not determine the maximal depth available\n");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
while (ndepths-- > 0) {
|
while (ndepths-- > 0) {
|
||||||
@ -429,7 +429,7 @@ static bool init_fbdev_dga(char *in_fb_name)
|
|||||||
|
|
||||||
// Set colormap
|
// Set colormap
|
||||||
if (depth == 8) {
|
if (depth == 8) {
|
||||||
XSetWindowColormap(x_display, the_win, cmap[current_dga_cmap = 0]);
|
XSetWindowColormap(x_display, the_win, cmap[0]);
|
||||||
XSetWMColormapWindows(x_display, the_win, &the_win, 1);
|
XSetWMColormapWindows(x_display, the_win, &the_win, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,8 +465,6 @@ static bool init_fbdev_dga(char *in_fb_name)
|
|||||||
#else
|
#else
|
||||||
VideoMonitor.mac_frame_base = MacFrameBaseMac;
|
VideoMonitor.mac_frame_base = MacFrameBaseMac;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("FbDev DGA with %s in %d-bit mode enabled\n", fb_name, fb_depth);
|
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
ErrorAlert("Basilisk II has been compiled with fbdev DGA support disabled.");
|
ErrorAlert("Basilisk II has been compiled with fbdev DGA support disabled.");
|
||||||
@ -948,9 +946,6 @@ static void resume_emul(void)
|
|||||||
#if ENABLE_XF86_DGA
|
#if ENABLE_XF86_DGA
|
||||||
XF86DGAInstallColormap(x_display, screen, cmap[current_dga_cmap]);
|
XF86DGAInstallColormap(x_display, screen, cmap[current_dga_cmap]);
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_FBDEV_DGA
|
|
||||||
XSetWindowColormap(x_display, the_win, cmap[current_dga_cmap]);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Unlock frame buffer (and continue MacOS thread)
|
// Unlock frame buffer (and continue MacOS thread)
|
||||||
pthread_mutex_unlock(&frame_buffer_lock);
|
pthread_mutex_unlock(&frame_buffer_lock);
|
||||||
@ -1417,11 +1412,6 @@ static void *redraw_func(void *arg)
|
|||||||
XF86DGAInstallColormap(x_display, screen, cmap[current_dga_cmap]);
|
XF86DGAInstallColormap(x_display, screen, cmap[current_dga_cmap]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_FBDEV_DGA
|
|
||||||
if (display_type == DISPLAY_DGA)
|
|
||||||
XSetWindowColormap(x_display, the_win, cmap[current_dga_cmap]);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&palette_lock);
|
pthread_mutex_unlock(&palette_lock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user