--- uae/src/xwin.c 2018/04/24 16:39:54 1.1.1.3 +++ uae/src/xwin.c 2018/04/24 16:40:49 1.1.1.4 @@ -208,9 +208,11 @@ static int get_vidmodes (void) { return XF86VidModeGetAllModeLines (display, screen, &vidmodecount, &allmodes); } +#endif static void switch_to_best_mode (void) { +#ifdef USE_VIDMODE_EXTENSION int i, best; best = 0; for (i = 1; i < vidmodecount; i++) { @@ -225,13 +227,11 @@ static void switch_to_best_mode (void) current_width, current_height); XF86VidModeSwitchToMode (display, screen, allmodes[best]); XF86VidModeSetViewPort (display, screen, 0, 0); +#endif XMoveWindow (display, mywin, 0, 0); XWarpPointer (display, None, rootwin, 0, 0, 0, 0, 0, 0); switch_to_dga_mode (); } -#else - -#endif static void enter_dga_mode (void) { @@ -1416,7 +1416,7 @@ static void set_window_for_amiga (void) #endif } - if (gfxvidinfo.pixbytes == 1) + if (visualInfo.VI_CLASS != TrueColor) for (i = 0; i < 256; i++) { XStoreColor (display, cmap, parsed_xcolors + i); XStoreColor (display, cmap2, parsed_xcolors + i); @@ -1435,9 +1435,9 @@ void gfx_set_picasso_modeinfo (int w, in picasso_vidinfo.width = w; picasso_vidinfo.height = h; picasso_vidinfo.depth = depth; - picasso_vidinfo.pixbytes = gfxvidinfo.pixbytes; + picasso_vidinfo.pixbytes = bit_unit >> 3; #ifdef USE_DGA_EXTENSION - picasso_vidinfo.rowbytes = fb_width * gfxvidinfo.pixbytes; + picasso_vidinfo.rowbytes = fb_width * picasso_vidinfo.pixbytes; #else picasso_vidinfo.rowbytes = picasso_img->bytes_per_line; #endif