summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-01-01 14:20:48 +0000
committerbelugas <belugas@openttd.org>2008-01-01 14:20:48 +0000
commit3dd61f423ad6c79f319388625f2223d0e46a2f16 (patch)
tree4649001ed8ff619fb2275a558ad17a1e8a942a9c /src/gfx.cpp
parenta8611311ac842618f0be9e20b8339e7adbf86738 (diff)
downloadopenttd-3dd61f423ad6c79f319388625f2223d0e46a2f16.tar.xz
(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.
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index b198c2e11..8a18d95c8 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -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)