mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Fixed a warning.
This commit is contained in:
parent
b3fd961986
commit
023bc44abd
|
@ -341,7 +341,7 @@ void Font::drawText(std::string text, int startx, int starty, int color)
|
|||
|
||||
void Font::sizeText(std::string text, int* w, int* h)
|
||||
{
|
||||
int cwidth = 0;
|
||||
float cwidth = 0.0f;
|
||||
for(unsigned int i = 0; i < text.length(); i++)
|
||||
{
|
||||
unsigned char letter = text[i];
|
||||
|
@ -352,10 +352,10 @@ void Font::sizeText(std::string text, int* w, int* h)
|
|||
}
|
||||
|
||||
if(w != NULL)
|
||||
*w = cwidth;
|
||||
*w = (int)cwidth;
|
||||
|
||||
if(h != NULL)
|
||||
*h = (int)(mMaxGlyphHeight * 1.5f * fontScale);
|
||||
*h = getHeight();
|
||||
}
|
||||
|
||||
int Font::getHeight()
|
||||
|
|
Loading…
Reference in a new issue