MACGUI: Fix int/int32 build failures

All of this is because Rect and Surface have moved to int32
This commit is contained in:
Le Philousophe 2021-07-05 23:19:10 +02:00
parent c2bd0cfb90
commit 25426c0a80
2 changed files with 4 additions and 4 deletions

View File

@ -1123,7 +1123,7 @@ void MacText::appendText_(const Common::U32String &strWithFont, uint oldLen) {
_contentIsDirty = true;
if (_editable) {
_scrollPos = MAX(0, getTextHeight() - getDimensions().height());
_scrollPos = MAX<int>(0, getTextHeight() - getDimensions().height());
_cursorRow = getLineCount();
_cursorCol = getLineCharWidth(_cursorRow);
@ -1749,7 +1749,7 @@ void MacText::scroll(int delta) {
if (_editable)
_scrollPos = CLIP<int>(_scrollPos, 0, MacText::getTextHeight() - kConScrollStep);
else
_scrollPos = CLIP<int>(_scrollPos, 0, MAX(0, MacText::getTextHeight() - getDimensions().height()));
_scrollPos = CLIP<int>(_scrollPos, 0, MAX<int>(0, MacText::getTextHeight() - getDimensions().height()));
undrawCursor();
_cursorY -= (_scrollPos - oldScrollPos);

View File

@ -131,7 +131,7 @@ void MacTextWindow::appendText(const Common::U32String &str, const MacFont *macF
_inputIsDirty = true; //force it to redraw input
if (_editable) {
_scrollPos = MAX(0, _mactext->getTextHeight() - getInnerDimensions().height());
_scrollPos = MAX<int>(0, _mactext->getTextHeight() - getInnerDimensions().height());
updateCursorPos();
}
@ -536,7 +536,7 @@ void MacTextWindow::scroll(int delta) {
if (_editable)
_scrollPos = CLIP<int>(_scrollPos, 0, _mactext->getTextHeight() - kConScrollStep);
else
_scrollPos = CLIP<int>(_scrollPos, 0, MAX(0, _mactext->getTextHeight() - getInnerDimensions().height()));
_scrollPos = CLIP<int>(_scrollPos, 0, MAX<int>(0, _mactext->getTextHeight() - getInnerDimensions().height()));
undrawCursor();
_cursorY -= (_scrollPos - oldScrollPos);