mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-26 21:44:22 +01:00
Correct max width
This commit is contained in:
parent
081f22fa8a
commit
d80cb3436c
4
menu.cpp
4
menu.cpp
@ -1,6 +1,6 @@
|
||||
/*********************************************************************
|
||||
*
|
||||
* Copyright (C) 2004,2008, Simon Kagstrom
|
||||
* Copyright (C) 2004-2009, Simon Kagstrom
|
||||
*
|
||||
* Filename: menu.c
|
||||
* Author: Simon Kagstrom <simon.kagstrom@gmail.com>
|
||||
@ -29,7 +29,7 @@ void Menu::printText(SDL_Surface *where, const char *msg, SDL_Color clr,
|
||||
tw = this->font->getWidth(buf);
|
||||
|
||||
/* Crop text */
|
||||
if (x + tw > w)
|
||||
if (tw > w)
|
||||
{
|
||||
int pixels_per_char = tw / strlen(buf);
|
||||
int last_char = (w / pixels_per_char) - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user