summaryrefslogtreecommitdiff
path: root/games/xblockout/patches/patch-ac
blob: 883d9d92c422b362e3c4329067b50f8e4f6d0d42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$NetBSD: patch-ac,v 1.1 2009/02/19 12:36:15 drochner Exp $

--- initmenu.c.orig	2005-11-07 21:40:38.000000000 +0100
+++ initmenu.c
@@ -408,37 +408,34 @@ void inittext(struct menu *m, struct opt
   XCharStruct overall_return ;
 
   m->xfont = XLoadQueryFont( x->display , opt->thefont ) ;
-  m->font = XLoadFont( x->display , opt->thefont ) ;
   if ( opt->verbose )
     {
       fprintf(stderr,"font=%s\n", opt->thefont) ;
     }
-  if ( m->font==BadAlloc || m->font==BadName || m->xfont==0 )
+  if ( m->xfont==0 )
     {
       fprintf(stderr,"Some problems when loading a font... trying others\n") ;
       m->xfont = XLoadQueryFont( x->display , 
-				 "-*-*-*-*-*-*-*-*-*-*-*-*-*-*" ) ;
-      m->font = XLoadFont( x->display , 
-			   "-*-*-*-*-*-*-*-*-*-*-*-*-*-*" ) ;
-      if ( m->font==BadAlloc || m->font==BadName || m->xfont==0 )
+				 "fixed" ) ;
+      if ( m->xfont==0 )
 	{
-	  fprintf(stderr,"You haven't -*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
+	  fprintf(stderr,"You haven't \"fixed\"\n");
 	  fprintf(stderr,"Have you A font?\n");
 	  fprintf(stderr,"Retry with -font option\n");
 	  exit(1) ;
 	}
     }
+  m->font = m->xfont->fid;
   m->xfont2 = XLoadQueryFont( x->display , opt->thefont2 ) ;
-  m->font2 = XLoadFont( x->display , opt->thefont2 ) ;
   if ( opt->verbose )
     {
       fprintf(stderr,"font2=%s\n", opt->thefont2) ;
     }
-  if ( m->font2==BadAlloc || m->font2==BadName || m->xfont2==0 )
+  if ( m->xfont2==0 )
     {
-      m->font2 = m->font ;
       m->xfont2 = m->xfont ;
     }
+  m->font2 = m->xfont2->fid;
 
   xgc.background = x->back_pixel ;
   xgc.foreground = opt->backcolor!=7 ? x->white_pixel : x->black_pixel;