Fix a bunch of 'Failed to create texture' errors being written to console

This commit is contained in:
2024-08-24 20:50:26 -04:00
parent ccc53058f9
commit ec2a20208e

View File

@@ -165,7 +165,7 @@ void cTextMsg::recalcRect() {
calc_rect.width() = 100 * max_line_chars;
}
sf::RenderTexture temp;
temp.create(frame.width(), frame.height());
temp.create(calc_rect.width(), calc_rect.height());
rectangle test_rect = calc_rect;
test_rect.offset(-test_rect.left, -test_rect.top);
rects = draw_string_hilite(temp, test_rect, getText(), style, hilites, sf::Color::Black);