[uae] 8.28 and linux framebuffer

  • From: Don Venhaus <76665.562@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Thu, 18 Aug 2005 18:38:07 -0400

I decided to play around with the linux framebuffer because of a comment in
CHANGES, and discovered a small problem.  If there's no exact match in
resolution, 8.28 now always goes to the largest rather than the nearest that's
large enough. The reason seems to be that the modes are returned in largest to
smallest order. So I made a small change to sdlgfx. In the routine
"find_best_mode"...

        write_log ("SDLGFX: Requested mode (%dx%d%d) not available.\n", *width, 
*height, depth);

        for (i = 0; i < mode_count && !found; i++) {
            if (screenmode[i].w >= *width && screenmode[i].h >= *height)


change the for loop to count down

        for (i = mode_count-1; i > -1 ; i--) {

And change

        /* If we didn't find a mode, use the largest supported mode */
        if (i == mode_count)
            i = mode_count;

to

        /* If we didn't find a mode, use the largest supported mode */
        if (i < 0)
            i = 0;


BTW, two other things ( maybe SDLs problem). If there is no resolution
change it looks like uae didn't come up. But if I switch consoles ( Alt-F2,
then back with Alt-F1) it's there. Also, with 8-bit mode, colors are wacky.

don



Other related posts: