diff 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
line wrap: on
line diff
--- a/src/video/xbios/SDL_xbios_sb3.c	Mon Sep 14 00:08:12 2009 +0000
+++ b/src/video/xbios/SDL_xbios_sb3.c	Sat Sep 19 12:46:00 2009 +0000
@@ -63,24 +63,21 @@
 	return 0;
 }
 
-void SDL_XBIOS_SB3Init(_THIS, scpn_cookie_t *cookie_scpn)
+void SDL_XBIOS_ListSB3Modes(_THIS, int actually_add, scpn_cookie_t *cookie_scpn)
 {
 	scpn_screeninfo_t *scrinfo;
+	xbiosmode_t modeinfo;
 
-	/* SB3 prevent changing video modes, we can only use current one */
-	if (XBIOS_modelist) {
-		SDL_free(XBIOS_modelist);
-		XBIOS_nummodes = 0;
-		XBIOS_modelist = NULL;
+	scrinfo = cookie_scpn->screen_info;
+	if (actually_add) {
+		scrinfo->h_pos = scrinfo->v_pos = 0;
 	}
 
-	scrinfo = cookie_scpn->screen_info;
-	scrinfo->h_pos = scrinfo->v_pos = 0;
+	modeinfo.number = -1;
+	modeinfo.width = scrinfo->virtual_width;
+	modeinfo.height = scrinfo->virtual_height;
+	modeinfo.depth = 1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]);
+	modeinfo.doubleline = SDL_FALSE;
 
-	SDL_XBIOS_AddMode(this,
-		-1,
-		scrinfo->virtual_width, scrinfo->virtual_height,
-		1<<(SDL_XBIOS_scpn_planes_device[scrinfo->device]),
-		SDL_FALSE
-	);
+	SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
 }