(svn r11734) -Change: Allow ToggleFullScreen to return the result of the operation' attempt. Previously, only visual clues were available.

-Fix[FS#1519]: When you can not use this resolution at full screen, now you'll know that it failed.
As for the reason it did not work, each computer/OS has its reason.
This commit is contained in:
belugas
2008-01-01 14:20:48 +00:00
parent a8611311ac
commit 3dd61f423a
15 changed files with 30 additions and 23 deletions

View File

@@ -1275,12 +1275,13 @@ bool ChangeResInGame(int width, int height)
return (_screen.width == width && _screen.height == height) || _video_driver->ChangeResolution(width, height);
}
void ToggleFullScreen(bool fs)
bool ToggleFullScreen(bool fs)
{
_video_driver->ToggleFullscreen(fs);
bool result = _video_driver->ToggleFullscreen(fs);
if (_fullscreen != fs && _num_resolutions == 0) {
DEBUG(driver, 0, "Could not find a suitable fullscreen resolution");
}
return result;
}
static int CDECL compare_res(const void *pa, const void *pb)