Hello
before libnsfb when call SDL_VideoModeOK get the colour depth of the
desktop.so its possible to tell sdl the depth the desktop screen have and
sdl need not convert.
after call i put the correct depth to the newfb->bpp entry.so netsurf use
correct color depth automatic.
but this work not on new netsurf with libnsfb.the change of the color depth
is not accept, graphic is wrong and do memtrash when run on 16 bit screen
Is there a offical way to change color depth in that func, or return
colordepth ?
i think its usefull that in this func width height and depth can change, for
example if a user have too width settings, it can automatic make smaller to
fit on desktop.
static int sdl_initialise(nsfb_t *nsfb)
{
.....
depth = SDL_VideoModeOK(nsfb->width,nsfb->height,nsfb->bpp, SDL_SWSURFACE);
if (!depth){
fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
return -1;
}
nsfb->bpp = depth;
sdl_screen = SDL_SetVideoMode(nsfb->width,
nsfb->height,
nsfb->bpp,
SDL_HWSURFACE);
Regards