(svn r3187) Simplify overly complicated ifs, especially if (foo) return false; else return true; is confusing

This commit is contained in:
tron
2005-11-15 09:47:25 +00:00
parent 9f8c5d8fd2
commit 24f857ed5e
5 changed files with 17 additions and 55 deletions

7
gfx.c
View File

@@ -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);}