mirror of
https://github.com/joel16/SDL2.git
synced 2024-12-12 21:46:13 +00:00
Date: Mon, 12 Jul 2004 14:17:47 -0500
From: Richard Smith Subject: Re: [SDL] Disableing color depth and mode searching > Also, I should add that a quick way to get the desired effect is to > #define BROKEN_MODES on top of the SDL_fbvideo.c file. > Ah yes, I see that looks like that will do what I need. Curious as to why this is a #define and not an enviroment variable like the other settings. I would think that finding cards (or chips) with broken modes would be the norm rather than the execption. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40942
This commit is contained in:
parent
cebd45ab2d
commit
87de03dc14
@ -463,31 +463,31 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
||||
current_w = vinfo.xres;
|
||||
current_h = vinfo.yres;
|
||||
current_index = ((vinfo.bits_per_pixel+7)/8)-1;
|
||||
#ifdef BROKEN_MODES
|
||||
FB_AddMode(this, current_index, current_w, current_h);
|
||||
#else
|
||||
for ( i=0; i<NUM_MODELISTS; ++i ) {
|
||||
SDL_nummodes[i] = 0;
|
||||
SDL_modelist[i] = NULL;
|
||||
for ( j=0; j<(sizeof(checkres)/sizeof(checkres[0])); ++j ) {
|
||||
unsigned int w, h;
|
||||
if ( getenv("SDL_FB_BROKEN_MODES") != NULL ) {
|
||||
FB_AddMode(this, current_index, current_w, current_h);
|
||||
} else {
|
||||
for ( i=0; i<NUM_MODELISTS; ++i ) {
|
||||
SDL_nummodes[i] = 0;
|
||||
SDL_modelist[i] = NULL;
|
||||
for ( j=0; j<(sizeof(checkres)/sizeof(checkres[0])); ++j ) {
|
||||
unsigned int w, h;
|
||||
|
||||
/* See if we are querying for the current mode */
|
||||
w = checkres[j].w;
|
||||
h = checkres[j].h;
|
||||
if ( i == current_index ) {
|
||||
if ( (current_w > w) || (current_h > h) ) {
|
||||
/* Only check once */
|
||||
FB_AddMode(this, i, current_w, current_h);
|
||||
current_index = -1;
|
||||
/* See if we are querying for the current mode */
|
||||
w = checkres[j].w;
|
||||
h = checkres[j].h;
|
||||
if ( i == current_index ) {
|
||||
if ( (current_w > w) || (current_h > h) ) {
|
||||
/* Only check once */
|
||||
FB_AddMode(this, i, current_w, current_h);
|
||||
current_index = -1;
|
||||
}
|
||||
}
|
||||
if ( FB_CheckMode(this, &vinfo, i, &w, &h) ) {
|
||||
FB_AddMode(this, i, w, h);
|
||||
}
|
||||
}
|
||||
if ( FB_CheckMode(this, &vinfo, i, &w, &h) ) {
|
||||
FB_AddMode(this, i, w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* BROKEN_MODES */
|
||||
|
||||
/* Fill in our hardware acceleration capabilities */
|
||||
this->info.wm_available = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user