fix timer not getting drawn on highres screens

This commit is contained in:
ehouse 2005-06-23 04:21:35 +00:00
parent d4dd21fc42
commit e0f5a64399

View file

@ -1024,11 +1024,18 @@ static void
palm_draw_drawTimer( DrawCtx* p_dctx, XP_Rect* rInner, XP_Rect* rOuter, palm_draw_drawTimer( DrawCtx* p_dctx, XP_Rect* rInner, XP_Rect* rOuter,
XP_U16 player, XP_S16 secondsLeft ) XP_U16 player, XP_S16 secondsLeft )
{ {
/* This is called both from within drawScoreboard and not, meaning that
* sometimes draw_boardBegin() and draw_boardFinished() bracket it and
* sometimes they don't. So it has to do its own HIGHRES_PUSH_LOC stuff.
*/
PalmDrawCtx* dctx = (PalmDrawCtx*)p_dctx;
XP_UCHAR buf[10]; XP_UCHAR buf[10];
XP_Rect localR = *rInner; XP_Rect localR = *rInner;
RectangleType saveClip; RectangleType saveClip;
XP_U16 len, width; XP_U16 len, width;
HIGHRES_PUSH_LOC(dctx);
palmFormatTimerText( buf, secondsLeft ); palmFormatTimerText( buf, secondsLeft );
len = XP_STRLEN( (const char*)buf ); len = XP_STRLEN( (const char*)buf );
@ -1041,13 +1048,19 @@ palm_draw_drawTimer( DrawCtx* p_dctx, XP_Rect* rInner, XP_Rect* rOuter,
localR.width = width; localR.width = width;
} }
localR.top -= 2; #ifdef FEATURE_HIGHRES
localR.height += 1; if ( !dctx->doHiRes ) {
localR.height += 1;
}
#endif
WinGetClip( &saveClip ); WinGetClip( &saveClip );
WinSetClip( (RectangleType*)&localR ); WinSetClip( (RectangleType*)&localR );
WinDrawChars( (const char*)buf, len, localR.left, localR.top );
WinDrawChars( (const char*)buf, len, localR.left, localR.top - 2 );
WinSetClip( &saveClip ); WinSetClip( &saveClip );
HIGHRES_POP_LOC(dctx);
} /* palm_draw_drawTimer */ } /* palm_draw_drawTimer */
#define MINI_LINE_HT 12 #define MINI_LINE_HT 12