OPENGL: Fix truncation issue resulting in wrong mouse coordinates.
This commit is contained in:
parent
f879f8af04
commit
1124d1db31
1 changed files with 2 additions and 2 deletions
|
@ -928,8 +928,8 @@ void OpenGLGraphicsManager::adjustMousePosition(int16 &x, int16 &y) {
|
|||
const int16 width = _gameScreen->getWidth();
|
||||
const int16 height = _gameScreen->getHeight();
|
||||
|
||||
x = (x * width) / _displayWidth;
|
||||
y = (y * height) / _displayHeight;
|
||||
x = (x * width) / (int)_displayWidth;
|
||||
y = (y * height) / (int)_displayHeight;
|
||||
|
||||
// Make sure we only supply valid coordinates.
|
||||
x = CLIP<int16>(x, 0, width - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue