Skip to content

Commit

Permalink
Update pvFontLast
Browse files Browse the repository at this point in the history
  • Loading branch information
ImpulseAdventure committed Aug 1, 2021
1 parent c3b4627 commit b90928c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GUIslice_drv_tft_espi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ bool gslc_DrvDrawTxtAlign(gslc_tsGui* pGui,int16_t nX0,int16_t nY0,int16_t nX1,i
if (pFont->eFontRefType == GSLC_FONTREF_FNAME){
if (pFont->pvFont != pDriver->pvFontLast) {
m_disp.loadFont((const char*)pFont->pvFont);
pDriver->pvFontLast = (void*)pFont->pvFont;
pDriver->pvFontLast = pFont->pvFont;
}
} else {
m_disp.setFreeFont((const GFXfont *)pFont->pvFont);
Expand Down Expand Up @@ -486,7 +486,7 @@ bool gslc_DrvDrawTxt(gslc_tsGui* pGui,int16_t nTxtX,int16_t nTxtY,gslc_tsFont* p
if (pFont->eFontRefType == GSLC_FONTREF_FNAME){
if (pFont->pvFont != pDriver->pvFontLast) {
m_disp.loadFont((const char*)pFont->pvFont);
pDriver->pvFontLast = (void*)pFont->pvFont;
pDriver->pvFontLast = pFont->pvFont;
}
m_disp.setTextColor(nColRaw,nColBgRaw);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/GUIslice_drv_tft_espi.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ typedef struct {

gslc_tsRect rClipRect; ///< Clipping rectangle

void* pvFontLast; ///< Last loadFont() reference
const void* pvFontLast; ///< Last loadFont() reference

} gslc_tsDriver;

Expand Down

0 comments on commit b90928c

Please sign in to comment.