Author: cazfi
Date: Wed Oct 19 09:53:01 2016
New Revision: 34174

URL: http://svn.gna.org/viewcvs/freeciv?rev=34174&view=rev
Log:
When screen size cannot be queried, assume minimum height instead of 
considering it zero,
when deciding size for intro picture.

See patch #7845

Modified:
    trunk/client/gui-gtk-3.0/pages.c
    trunk/client/gui-gtk-3.22/pages.c

Modified: trunk/client/gui-gtk-3.0/pages.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/pages.c?rev=34174&r1=34173&r2=34174&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/pages.c    (original)
+++ trunk/client/gui-gtk-3.0/pages.c    Wed Oct 19 09:53:01 2016
@@ -254,6 +254,11 @@
   intro_in = load_gfxfile(tileset_main_intro_filename(tileset));
   get_sprite_dimensions(intro_in, &width, &height);
   sh = screen_height();
+
+  if (sh <= 0) {
+    /* Assume some minimum height */
+    sh = 600;
+  }
 
   space_needed = 250;
 #if IS_BETA_VERSION

Modified: trunk/client/gui-gtk-3.22/pages.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/pages.c?rev=34174&r1=34173&r2=34174&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.22/pages.c   (original)
+++ trunk/client/gui-gtk-3.22/pages.c   Wed Oct 19 09:53:01 2016
@@ -254,6 +254,11 @@
   intro_in = load_gfxfile(tileset_main_intro_filename(tileset));
   get_sprite_dimensions(intro_in, &width, &height);
   sh = screen_height();
+
+  if (sh <= 0) {
+    /* Assume some minimum height */
+    sh = 600;
+  }
 
   space_needed = 250;
 #if IS_BETA_VERSION


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to