# HG changeset patch # User Patrice Mandin # Date 1076153156 0 # Node ID ff1058d642dc16cab61f3e913fbd85204ee45d4a # Parent 60a4293ffea95d82ab837acc334689000a2879a8 Video modes must be sorted by Y size, for SDL_GetVideoMode() to operate properly diff -r 60a4293ffea9 -r ff1058d642dc src/video/xbios/SDL_xbios.c --- a/src/video/xbios/SDL_xbios.c Fri Feb 06 22:53:32 2004 +0000 +++ b/src/video/xbios/SDL_xbios.c Sat Feb 07 11:25:56 2004 +0000 @@ -93,21 +93,21 @@ static int xbiosnummodes_f30rvb=16; static xbiosmode_t xbiosmodelist_f30rvb[]={ {BPS16|COL80|OVERSCAN|VERTFLAG,768,480,16,SDL_FALSE}, + {BPS16|OVERSCAN|VERTFLAG,384,480,16,SDL_FALSE}, + {BPS16|COL80|VERTFLAG,640,400,16,SDL_FALSE}, + {BPS16|VERTFLAG,320,400,16,SDL_FALSE}, {BPS16|COL80|OVERSCAN,768,240,16,SDL_FALSE}, - {BPS16|COL80|VERTFLAG,640,400,16,SDL_FALSE}, + {BPS16|OVERSCAN,384,240,16,SDL_FALSE}, {BPS16|COL80,640,200,16,SDL_FALSE}, - {BPS16|OVERSCAN|VERTFLAG,384,480,16,SDL_FALSE}, - {BPS16|OVERSCAN,384,240,16,SDL_FALSE}, - {BPS16|VERTFLAG,320,400,16,SDL_FALSE}, {BPS16,320,200,16,SDL_FALSE}, {BPS8|COL80|OVERSCAN|VERTFLAG,768,480,8,SDL_FALSE}, + {BPS8|OVERSCAN|VERTFLAG,384,480,8,SDL_FALSE}, + {BPS8|COL80|VERTFLAG,640,400,8,SDL_FALSE}, + {BPS8|VERTFLAG,320,400,8,SDL_FALSE}, {BPS8|COL80|OVERSCAN,768,240,8,SDL_FALSE}, - {BPS8|COL80|VERTFLAG,640,400,8,SDL_FALSE}, + {BPS8|OVERSCAN,384,240,8,SDL_FALSE}, {BPS8|COL80,640,200,8,SDL_FALSE}, - {BPS8|OVERSCAN|VERTFLAG,384,480,8,SDL_FALSE}, - {BPS8|OVERSCAN,384,240,8,SDL_FALSE}, - {BPS8|VERTFLAG,320,400,8,SDL_FALSE}, {BPS8,320,200,8,SDL_FALSE} }; @@ -118,8 +118,8 @@ {BPS16|VERTFLAG,320,240,16,SDL_FALSE}, {BPS8|COL80,640,480,8,SDL_FALSE}, + {BPS8,320,480,8,SDL_FALSE}, {BPS8|COL80|VERTFLAG,640,240,8,SDL_FALSE}, - {BPS8,320,480,8,SDL_FALSE}, {BPS8|VERTFLAG,320,240,8,SDL_FALSE} }; @@ -437,8 +437,13 @@ /* Free current buffers */ XBIOS_FreeBuffers(this); + /* Limit bpp */ + if (bpp>16) { + bpp = 16; + } + bpp >>= 4; + /* Search if the mode exists (width, height, bpp) */ - bpp >>= 4; for ( mode=0; SDL_modelist[bpp][mode]; ++mode ) { if ( (SDL_modelist[bpp][mode]->w == width) && (SDL_modelist[bpp][mode]->h == height) ) { @@ -785,6 +790,7 @@ Atari_ShutdownEvents(); /* Restore video mode and palette */ +#ifndef DEBUG_VIDEO_XBIOS switch(XBIOS_cvdo >> 16) { case VDO_ST: case VDO_STE: @@ -809,6 +815,7 @@ break; } Vsync(); +#endif if (XBIOS_oldpalette) { free(XBIOS_oldpalette);