Fixed trashing the framebuffer console on broken video drivers
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40488
This commit is contained in:
parent
32e1f1bc86
commit
aee272f0a5
1 changed files with 5 additions and 1 deletions
|
@ -463,6 +463,9 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
||||||
current_w = vinfo.xres;
|
current_w = vinfo.xres;
|
||||||
current_h = vinfo.yres;
|
current_h = vinfo.yres;
|
||||||
current_index = ((vinfo.bits_per_pixel+7)/8)-1;
|
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 ) {
|
for ( i=0; i<NUM_MODELISTS; ++i ) {
|
||||||
SDL_nummodes[i] = 0;
|
SDL_nummodes[i] = 0;
|
||||||
SDL_modelist[i] = NULL;
|
SDL_modelist[i] = NULL;
|
||||||
|
@ -475,7 +478,7 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
||||||
if ( i == current_index ) {
|
if ( i == current_index ) {
|
||||||
if ( (current_w > w) || (current_h > h) ) {
|
if ( (current_w > w) || (current_h > h) ) {
|
||||||
/* Only check once */
|
/* Only check once */
|
||||||
FB_AddMode(this, i,current_w,current_h);
|
FB_AddMode(this, i, current_w, current_h);
|
||||||
current_index = -1;
|
current_index = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -484,6 +487,7 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* BROKEN_MODES */
|
||||||
|
|
||||||
/* Fill in our hardware acceleration capabilities */
|
/* Fill in our hardware acceleration capabilities */
|
||||||
this->info.wm_available = 0;
|
this->info.wm_available = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue