Merge pull request #698 from Zaneo/clip_stylus_input

EmuWindow: Clip mouse input coordinates to emulated screen dimensions.
This commit is contained in:
Tony Wasserka 2015-05-02 19:15:03 +02:00
commit 7859b145cf
4 changed files with 23 additions and 8 deletions

View file

@ -225,7 +225,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent *event)
void GRenderWindow::mouseMoveEvent(QMouseEvent *event)
{
auto pos = event->pos();
this->TouchMoved(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y()));
this->TouchMoved(static_cast<unsigned>(std::max(pos.x(), 0)), static_cast<unsigned>(std::max(pos.y(), 0)));
}
void GRenderWindow::mouseReleaseEvent(QMouseEvent *event)