Author: cazfi Date: Tue Aug 16 08:04:24 2016 New Revision: 33612 URL: http://svn.gna.org/viewcvs/freeciv?rev=33612&view=rev Log: Do not adjust initial defaults depending on screen size when screen size on unknown.
See bug #24968 Modified: branches/S2_6/client/gui-gtk-3.0/gui_main.c Modified: branches/S2_6/client/gui-gtk-3.0/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/gui_main.c?rev=33612&r1=33611&r2=33612&view=diff ============================================================================== --- branches/S2_6/client/gui-gtk-3.0/gui_main.c (original) +++ branches/S2_6/client/gui-gtk-3.0/gui_main.c Tue Aug 16 08:04:24 2016 @@ -2384,9 +2384,15 @@ **************************************************************************/ void adjust_default_options(void) { - if (screen_height() <= 480) { - /* Freeciv is practically unusable outside fullscreen mode in so - * small display */ - gui_options.gui_gtk3_fullscreen = TRUE; - } -} + int scr_height = screen_height(); + + if (scr_height > 0) { + /* Adjust these options only if we do know the screen height. */ + + if (scr_height <= 480) { + /* Freeciv is practically unusable outside fullscreen mode in so + * small display */ + gui_options.gui_gtk3_fullscreen = TRUE; + } + } +} _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits