[Scummvm-cvs-logs] SF.net SVN: scummvm:[52992] scummvm/trunk/engines/sci/graphics/controls.cpp
wjpalenstijn at users.sourceforge.net
wjpalenstijn at users.sourceforge.net
Sun Oct 3 16:52:15 CEST 2010
Revision: 52992
http://scummvm.svn.sourceforge.net/scummvm/?rev=52992&view=rev
Author: wjpalenstijn
Date: 2010-10-03 14:52:15 +0000 (Sun, 03 Oct 2010)
Log Message:
-----------
SCI: Fix textwidth computation for chars >= 128
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/controls.cpp
Modified: scummvm/trunk/engines/sci/graphics/controls.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/controls.cpp 2010-10-03 14:32:09 UTC (rev 52991)
+++ scummvm/trunk/engines/sci/graphics/controls.cpp 2010-10-03 14:52:15 UTC (rev 52992)
@@ -234,7 +234,7 @@
uint16 textWidth = 0;
const char *textPtr = text.c_str();
while (*textPtr)
- textWidth += _text16->_font->getCharWidth(*textPtr++);
+ textWidth += _text16->_font->getCharWidth((byte)*textPtr++);
textWidth += _text16->_font->getCharWidth(eventKey);
if (textWidth >= rect.width()) {
_text16->SetFont(oldFontId);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list