Fixed Wesnoth going into 16-bit color...

...when resizing the window or changing resolution in preferences.
This commit is contained in:
Ben Anderman 2009-01-26 04:55:48 +00:00
parent f940770b33
commit 62e13e7c36

View File

@ -102,7 +102,8 @@ void set_resolution(const std::pair<int,int>& resolution)
if(disp != NULL) {
CVideo& video = disp->video();
const int flags = fullscreen() ? FULL_SCREEN : 0;
const int bpp = video.modePossible(res.first,res.second,16,flags);
int bpp = video.modePossible(res.first,res.second,32,flags);
if (bpp == 0) bpp = video.modePossible(res.first,res.second, 16, flags);
if(bpp != 0) {
video.setMode(res.first,res.second,bpp,flags);
disp->redraw_everything();