Commit d695287c authored by Patrice Mandin's avatar Patrice Mandin

Disable Xbios video driver if FVDI present, but still allow it to be used when...

Disable Xbios video driver if FVDI present, but still allow it to be used when setting SDL_VIDEODRIVER

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403227
parent 9370bb5f
...@@ -53,6 +53,10 @@ ...@@ -53,6 +53,10 @@
#define XBIOS_VID_DRIVER_NAME "xbios" #define XBIOS_VID_DRIVER_NAME "xbios"
#ifndef C_fVDI
#define C_fVDI 0x66564449L
#endif
/* Debug print info */ /* Debug print info */
#if 0 #if 0
#define DEBUG_PRINT(what) \ #define DEBUG_PRINT(what) \
...@@ -95,6 +99,8 @@ static unsigned long F30_palette[256]; ...@@ -95,6 +99,8 @@ static unsigned long F30_palette[256];
static int XBIOS_Available(void) static int XBIOS_Available(void)
{ {
unsigned long cookie_vdo, cookie_mil, cookie_hade, cookie_scpn; unsigned long cookie_vdo, cookie_mil, cookie_hade, cookie_scpn;
unsigned long cookie_fvdi;
const char *envr = SDL_getenv("SDL_VIDEODRIVER");
/* Milan/Hades Atari clones do not have an Atari video chip */ /* Milan/Hades Atari clones do not have an Atari video chip */
if ( (Getcookie(C__MIL, &cookie_mil) == C_FOUND) || if ( (Getcookie(C__MIL, &cookie_mil) == C_FOUND) ||
...@@ -102,6 +108,17 @@ static int XBIOS_Available(void) ...@@ -102,6 +108,17 @@ static int XBIOS_Available(void)
return 0; return 0;
} }
/* fVDI means graphic card, so no Xbios with it */
if (Getcookie(C_fVDI, &cookie_fvdi) == C_FOUND) {
if (!envr) {
return 0;
}
if (SDL_strcmp(envr, XBIOS_VID_DRIVER_NAME)!=0) {
return 0;
}
/* Except if we force Xbios usage, through env var */
}
/* Cookie _VDO present ? if not, assume ST machine */ /* Cookie _VDO present ? if not, assume ST machine */
if (Getcookie(C__VDO, &cookie_vdo) != C_FOUND) { if (Getcookie(C__VDO, &cookie_vdo) != C_FOUND) {
cookie_vdo = VDO_ST << 16; cookie_vdo = VDO_ST << 16;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment