r11575 - in packages/trunk/xmahjongg/debian: . patches

Peter Pentchev roam-guest at alioth.debian.org
Sat Dec 11 11:21:05 UTC 2010


Author: roam-guest
Date: 2010-12-11 11:21:05 +0000 (Sat, 11 Dec 2010)
New Revision: 11575

Added:
   packages/trunk/xmahjongg/debian/patches/06-tileset-screen.patch
Modified:
   packages/trunk/xmahjongg/debian/changelog
   packages/trunk/xmahjongg/debian/patches/series
Log:
Choose the small tileset for screens less than 1024 pixels wide.
See the comment in the patch for why I *know* this not to be
a perfect solution, but it'll have to do for the present :)

Closes:		#606374
Reported by:	Mark Hobley <markhobley at yahoo.co.uk>


Modified: packages/trunk/xmahjongg/debian/changelog
===================================================================
--- packages/trunk/xmahjongg/debian/changelog	2010-12-10 11:24:05 UTC (rev 11574)
+++ packages/trunk/xmahjongg/debian/changelog	2010-12-11 11:21:05 UTC (rev 11575)
@@ -18,6 +18,8 @@
     the hardening flags are visible in CFLAGS and LDFLAGS.
   * Let debhelper's dh_auto_configure and dh_auto_install DTRT.
   * Bump the debhelper compatibility level to 8 with no changes.
+  * Choose the small tileset if the screen is less than 1024 pixels wide.
+    Closes: #606374
 
  -- Peter Pentchev <roam at ringlet.net>  Mon, 29 Nov 2010 17:18:09 +0200
 

Added: packages/trunk/xmahjongg/debian/patches/06-tileset-screen.patch
===================================================================
--- packages/trunk/xmahjongg/debian/patches/06-tileset-screen.patch	                        (rev 0)
+++ packages/trunk/xmahjongg/debian/patches/06-tileset-screen.patch	2010-12-11 11:21:05 UTC (rev 11575)
@@ -0,0 +1,38 @@
+Description: Choose the small tileset for screens less than 1024 pixels wide.
+ In a perfect world we'd do the check after the actual window has been
+ created, but the changes to the main() function's operation would be too big.
+Origin: other: svn://svn.debian.org/svn/pkg-games/packages/trunk/xmahjongg/
+Forwarded: no
+Bug-Debian: http://bugs.debian.org/606374
+Author: Peter Pentchev <roam at ringlet.net>
+Last-Update: 2010-12-11
+
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -519,7 +519,7 @@
+   // First, parse command-line options.
+   const char *display_name = 0;
+   const char *layout_name = 0;
+-  const char *tileset_name = "thick";
++  const char *tileset_name = NULL;
+   const char *background_name = "default";
+   const char *x_name = 0;
+   const char *geometry = 0;
+@@ -634,6 +634,17 @@
+   int screen_number = DefaultScreen(display);
+   choose_visual(display, screen_number);
+   
++  if (tileset_name == NULL) {
++    Screen *scr;
++
++    scr = ScreenOfDisplay(display, screen_number);
++    if (scr == NULL) fatal_error("could not get screen");
++    if (scr->width >= 1024)
++      tileset_name = "thick";
++    else
++      tileset_name = "small";
++  }
++
+   Tileset *tileset = load_tileset(tileset_name, config_dir);
+   Pixmap background = load_background(background_name, config_dir, gifx);
+   

Modified: packages/trunk/xmahjongg/debian/patches/series
===================================================================
--- packages/trunk/xmahjongg/debian/patches/series	2010-12-10 11:24:05 UTC (rev 11574)
+++ packages/trunk/xmahjongg/debian/patches/series	2010-12-11 11:21:05 UTC (rev 11575)
@@ -3,3 +3,4 @@
 03-compiler-warnings.patch
 04-gif-read-errors.patch
 05-feof.patch
+06-tileset-screen.patch




More information about the Pkg-games-commits mailing list