[Scummvm-cvs-logs] SF.net SVN: scummvm:[53012] scummvm/branches/branch-1-2-0/engines/sci/ graphics/controls.cpp
wjpalenstijn at users.sourceforge.net
wjpalenstijn at users.sourceforge.net
Mon Oct 4 10:45:08 CEST 2010
Revision: 53012
http://scummvm.svn.sourceforge.net/scummvm/?rev=53012&view=rev
Author: wjpalenstijn
Date: 2010-10-04 08:45:08 +0000 (Mon, 04 Oct 2010)
Log Message:
-----------
SCI: Backport r52992: Fix textwidth computation for chars >= 128
Modified Paths:
--------------
scummvm/branches/branch-1-2-0/engines/sci/graphics/controls.cpp
Modified: scummvm/branches/branch-1-2-0/engines/sci/graphics/controls.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/engines/sci/graphics/controls.cpp 2010-10-04 06:07:11 UTC (rev 53011)
+++ scummvm/branches/branch-1-2-0/engines/sci/graphics/controls.cpp 2010-10-04 08:45:08 UTC (rev 53012)
@@ -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