summaryrefslogtreecommitdiff
path: root/gfx.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-15 09:47:25 +0000
committertron <tron@openttd.org>2005-11-15 09:47:25 +0000
commit24f857ed5edab0bf79b1f0f2c18b9a6280103ffb (patch)
treed754a4bbb7a3e5f12b31a28e64345ca8be3cdd20 /gfx.c
parent9f8c5d8fd268cc6007047025650951a546133ce1 (diff)
downloadopenttd-24f857ed5edab0bf79b1f0f2c18b9a6280103ffb.tar.xz
(svn r3187) Simplify overly complicated ifs, especially if (foo) return false; else return true; is confusing
Diffstat (limited to 'gfx.c')
-rw-r--r--gfx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gfx.c b/gfx.c
index c8c6d6845..32ecca3ae 100644
--- a/gfx.c
+++ b/gfx.c
@@ -1970,10 +1970,9 @@ void SetAnimatedMouseCursor(const CursorID *table)
bool ChangeResInGame(int w, int h)
{
- if ((_screen.width != w || _screen.height != h) && !_video_driver->change_resolution(w, h))
- return false;
-
- return true;
+ return
+ (_screen.width == w && _screen.height == h) ||
+ _video_driver->change_resolution(w, h);
}
void ToggleFullScreen(bool fs) {_video_driver->toggle_fullscreen(fs);}