Refresh issue
This commit is contained in:
+4
-4
@@ -82,10 +82,10 @@ void MainWindow::checkEvents()
|
|||||||
void MainWindow::invalidate(const rect_t & rect)
|
void MainWindow::invalidate(const rect_t & rect)
|
||||||
{
|
{
|
||||||
if (invalidatedRect.w) {
|
if (invalidatedRect.w) {
|
||||||
coord_t left = min(invalidatedRect.left(), rect.left());
|
auto left = limit<coord_t>(0, rect.left(), invalidatedRect.left());
|
||||||
coord_t right = max(invalidatedRect.right(), rect.right());
|
auto right = limit<coord_t>(invalidatedRect.right(), rect.right(), LCD_W);
|
||||||
coord_t top = min(invalidatedRect.top(), rect.top());
|
auto top = limit<coord_t>(0, rect.top(), invalidatedRect.top());
|
||||||
coord_t bottom = max(invalidatedRect.bottom(), rect.bottom());
|
auto bottom = limit<coord_t>(rect.bottom(), invalidatedRect.bottom(), LCD_H);
|
||||||
invalidatedRect = {left, top, right - left, bottom - top};
|
invalidatedRect = {left, top, right - left, bottom - top};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user