Merge pull request #2607 from CookiePLMonster/osd-paths-fix

CommonHostInterface: Fix broken word wrap in DrawOSDMessages
pull/2617/head
Connor McLaughlin 4 years ago committed by GitHub
commit 1b5a744327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1504,8 +1504,8 @@ void CommonHostInterface::DrawOSDMessages()
break; break;
const ImVec2 pos(position_x, position_y); const ImVec2 pos(position_x, position_y);
const ImVec2 text_size( const ImVec2 text_size(font->CalcTextSizeA(font->FontSize, std::numeric_limits<float>::max(), max_width,
font->CalcTextSizeA(font->FontSize, max_width, -1.0f, msg.text.c_str(), msg.text.c_str() + msg.text.length())); msg.text.c_str(), msg.text.c_str() + msg.text.length()));
const ImVec2 size(text_size.x + padding * 2.0f, text_size.y + padding * 2.0f); const ImVec2 size(text_size.x + padding * 2.0f, text_size.y + padding * 2.0f);
const ImVec4 text_rect(pos.x + padding, pos.y + padding, pos.x + size.x - padding, pos.y + size.y - padding); const ImVec4 text_rect(pos.x + padding, pos.y + padding, pos.x + size.x - padding, pos.y + size.y - padding);

Loading…
Cancel
Save