comparison src/video/xbios/SDL_xbios_sb3.c @ 4194:05c9e942cc46 SDL-1.2

Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
author Patrice Mandin <patmandin@gmail.com>
date Sat, 19 Sep 2009 12:46:00 +0000
parents a1b03ba2fcd0
children 6405314a7c07
comparison
equal deleted inserted replaced
4193:430e6690c4cd 4194:05c9e942cc46
61 } 61 }
62 62
63 return 0; 63 return 0;
64 } 64 }
65 65
66 void SDL_XBIOS_SB3Init(_THIS, scpn_cookie_t *cookie_scpn) 66 void SDL_XBIOS_ListSB3Modes(_THIS, int actually_add, scpn_cookie_t *cookie_scpn)
67 { 67 {
68 scpn_screeninfo_t *scrinfo; 68 scpn_screeninfo_t *scrinfo;
69 xbiosmode_t modeinfo;
69 70
70 /* SB3 prevent changing video modes, we can only use current one */ 71 scrinfo = cookie_scpn->screen_info;
71 if (XBIOS_modelist) { 72 if (actually_add) {
72 SDL_free(XBIOS_modelist); 73 scrinfo->h_pos = scrinfo->v_pos = 0;
73 XBIOS_nummodes = 0;
74 XBIOS_modelist = NULL;
75 } 74 }
76 75
77 scrinfo = cookie_scpn->screen_info; 76 modeinfo.number = -1;
78 scrinfo->h_pos = scrinfo->v_pos = 0; 77 modeinfo.width = scrinfo->virtual_width;
78 modeinfo.height = scrinfo->virtual_height;
79 modeinfo.depth = 1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]);
80 modeinfo.doubleline = SDL_FALSE;
79 81
80 SDL_XBIOS_AddMode(this, 82 SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
81 -1,
82 scrinfo->virtual_width, scrinfo->virtual_height,
83 1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]),
84 SDL_FALSE
85 );
86 } 83 }