hi pals,
i've found a bug in the decision for the biggest graphics. it came, that while the call for _gr_selectmode had found a highly impressive mode of 1280*1024*4 (4 is the default color number for vga/vesa), in the inherited drivers it would settle for a best of 320*200*4 mode, because this is the first mode to match the colors number. i've changed the _gr_selectmode function in src/setup/setmode.c, so that instead of accepting any mode returned for the drv->inherit, this returned mode will be compared to the existing best features. remove: if (mp)best = mp; replace by if (mp && (best->bpp < mp->bpp || (best->bpp == mp->bpp && best->width + best->height < mp->width + mp->height))) best = mp; the mode i have received is 1280*1024*8bpp, which is realy the best for my card, and better than the default 4bpp.
best wishes, alex
Hi, Alex
i've found a bug in the decision for the biggest graphics. it came, that while the call for _gr_selectmode had found a highly impressive mode of 1280*1024*4 (4 is the default color number for vga/vesa), in the inherited drivers it would settle for a best of 320*200*4 mode, because this is the first mode to match the colors number. i've changed the _gr_selectmode function in src/setup/setmode.c, so that instead of accepting any mode returned for the drv->inherit, this returned mode will be compared to the existing best features.remove:if (mp)best = mp;replace by if (mp && (best->bpp < mp->bpp || (best->bpp == mp->bpp && best->width + best->height < mp->width + mp->height))) best = mp; the mode i have received is 1280*1024*8bpp, which is realy the best for my card, and better than the default 4bpp.
Not tested, but I see some problems here:
1- "best" can be NULL.
2- GR_biggest_graphics is supposed to return a mode with bpp = default_bpp
3- Probably your change return a bigger bpp mode if I go for a specific 4bpp mode like in GrSetMode(GR_width_height_bpp_graphics, 800, 600, 4);
Regards, Mariano.
PD. Alex, can you say me your complete name? (to add you to the contrib file) and if possible don't post in html.