Mercurial > sdl-ios-xcode
diff src/video/xbios/SDL_xbios_sb3.c @ 1042:0e7218843cfb
Dynamically create list of video modes, easier to add new ones
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Mon, 07 Mar 2005 10:00:58 +0000 |
parents | c6ed27c7d47d |
children | fba6b67b4d60 |
line wrap: on
line diff
--- a/src/video/xbios/SDL_xbios_sb3.c Wed Mar 02 17:17:26 2005 +0000 +++ b/src/video/xbios/SDL_xbios_sb3.c Mon Mar 07 10:00:58 2005 +0000 @@ -67,14 +67,19 @@ scpn_screeninfo_t *scrinfo; /* SB3 prevent changing video modes, we can only use current one */ - - XBIOS_nummodes = 1; - current_mode = XBIOS_modelist; - current_mode->number = -1; + if (XBIOS_modelist) { + free(XBIOS_modelist); + XBIOS_nummodes = 0; + XBIOS_modelist = NULL; + } scrinfo = cookie_scpn->screen_info; - current_mode->width = scrinfo->virtual_width; - current_mode->height = scrinfo->virtual_height; - current_mode->depth = 1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]); scrinfo->h_pos = scrinfo->v_pos = 0; + + SDL_XBIOS_AddMode(this, + -1, + scrinfo->virtual_width, scrinfo->virtual_height, + 1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]), + SDL_FALSE + ); }