mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-11-18 10:08:29 +01:00
fix timer not getting drawn on highres screens
This commit is contained in:
parent
5385c9f7dc
commit
3ab25c843b
1 changed files with 16 additions and 3 deletions
|
@ -1024,11 +1024,18 @@ static void
|
|||
palm_draw_drawTimer( DrawCtx* p_dctx, XP_Rect* rInner, XP_Rect* rOuter,
|
||||
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_Rect localR = *rInner;
|
||||
RectangleType saveClip;
|
||||
XP_U16 len, width;
|
||||
|
||||
HIGHRES_PUSH_LOC(dctx);
|
||||
|
||||
palmFormatTimerText( buf, secondsLeft );
|
||||
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.top -= 2;
|
||||
localR.height += 1;
|
||||
#ifdef FEATURE_HIGHRES
|
||||
if ( !dctx->doHiRes ) {
|
||||
localR.height += 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
WinGetClip( &saveClip );
|
||||
WinSetClip( (RectangleType*)&localR );
|
||||
WinDrawChars( (const char*)buf, len, localR.left, localR.top );
|
||||
|
||||
WinDrawChars( (const char*)buf, len, localR.left, localR.top - 2 );
|
||||
WinSetClip( &saveClip );
|
||||
|
||||
HIGHRES_POP_LOC(dctx);
|
||||
} /* palm_draw_drawTimer */
|
||||
|
||||
#define MINI_LINE_HT 12
|
||||
|
|
Loading…
Reference in a new issue