Skip to content

Commit b884237

Browse files
committed
Call FontDrawScale first in drawText
This is just to help the stack a little, as doing this allows the function to not have to store the scale on the stack before using it.
1 parent bb0a0a0 commit b884237

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ttyd-tools/rel/source/draw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ void drawStringMultiline(float x, float y, const char *text)
268268

269269
void drawText(const char *text, int32_t x, int32_t y, uint32_t color, float scale)
270270
{
271-
ttyd::fontmgr::FontDrawColor(reinterpret_cast<uint8_t *>(&color));
272271
ttyd::fontmgr::FontDrawScale(scale);
272+
ttyd::fontmgr::FontDrawColor(reinterpret_cast<uint8_t *>(&color));
273273

274274
uint32_t i = 0;
275275
char EndOfLineChar;

0 commit comments

Comments
 (0)