Skip to content

Commit

Permalink
Fix a warning
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed May 6, 2024
1 parent c576da9 commit 5af4180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opengl/LVGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ bool LVGLWidget<BaseWidget>::onMotion(const Widget::MotionEvent& event)
if (BaseWidget::onMotion(event))
return true;

lvglData->mousePos.x = std::max(0, std::min<int>(BaseWidget::getWidth(), event.pos.getX()));
lvglData->mousePos.y = std::max(0, std::min<int>(BaseWidget::getHeight(), event.pos.getY()));
lvglData->mousePos.x = std::max(0, std::min<int>(BaseWidget::getWidth() - 1, event.pos.getX()));
lvglData->mousePos.y = std::max(0, std::min<int>(BaseWidget::getHeight() - 1, event.pos.getY()));
return true;
}

Expand Down

0 comments on commit 5af4180

Please sign in to comment.