Fixed the default error handler to disable relative mouse mode.

This commit is contained in:
Alex Szpakowski
2015-08-18 22:13:06 -03:00
parent acca06907e
commit 71116807e3
3 changed files with 11 additions and 7 deletions
+3 -2
View File
@@ -693,7 +693,8 @@ void Font::getWrap(const std::string &text, float wrap, std::vector<std::string>
// Put words back together until a wrap occurs.
for (const std::string &word : words)
{
width += getWidth(word);
float wordwidth = (float) getWidth(word);
width += wordwidth;
// On wordwrap, push line to line buffer and clear string builder.
if (width > wrap && oldwidth > 0)
@@ -704,7 +705,7 @@ void Font::getWrap(const std::string &text, float wrap, std::vector<std::string>
std::string tmp = string_builder.str();
lines.push_back(tmp.substr(0,tmp.size()-1));
string_builder.str("");
width = static_cast<float>(getWidth(word));
width = wordwidth;
realw -= (int) width;
if (linewidths)