]> granicus.if.org Git - nethack/commitdiff
win ce keypad (from <Someone>)
authornethack.allison <nethack.allison>
Thu, 14 Aug 2003 11:23:33 +0000 (11:23 +0000)
committernethack.allison <nethack.allison>
Thu, 14 Aug 2003 11:23:33 +0000 (11:23 +0000)
> I had some reports similar to "#U574: 3.4.1 On PocketPC, screwed
> up message area font" but regarding the keypad window. Since
> there is no separate option for keypad font, this patch makes it
> use message font option if it is set.

sys/wince/mhcmd.c

index 8d63a80cca7c0e554890e82579deec413435a957..0ff3b762228b0b5dcc2a4d50f23f1a927be7aa4f 100644 (file)
@@ -800,7 +800,13 @@ void LayoutCmdWindow(HWND hWnd)
        lgfnt.lfOutPrecision    =       OUT_DEFAULT_PRECIS;  // output precision
        lgfnt.lfClipPrecision   =       CLIP_CHARACTER_PRECIS; // clipping precision
        lgfnt.lfQuality                 =       DEFAULT_QUALITY;     // output quality
-       lgfnt.lfPitchAndFamily  =       VARIABLE_PITCH;          // pitch and family
+       if( iflags.wc_font_message &&
+               *iflags.wc_font_message ) {
+               lgfnt.lfPitchAndFamily  = DEFAULT_PITCH;                 // pitch and family
+               NH_A2W( iflags.wc_font_message, lgfnt.lfFaceName, LF_FACESIZE);
+       } else {
+               lgfnt.lfPitchAndFamily  = VARIABLE_PITCH;                // pitch and family
+       }
        data->font[NH_CMDPAD_FONT_NORMAL] = CreateFontIndirect(&lgfnt);
 
        InvalidateRect(hWnd, NULL, TRUE);