Fix mouse going out of bounds in fullscreen

The coordinates were translated, but this was done on a copy
instead of overwriting the original object.
This commit is contained in:
Orgad Shaneh 2019-04-01 21:11:43 +03:00
parent 84487958d2
commit 64a4d498ce
3 changed files with 3 additions and 3 deletions

View file

@ -260,7 +260,7 @@ void ResVmSdlGraphicsManager::notifyVideoExpose() {
//updateScreen();
}
bool ResVmSdlGraphicsManager::notifyMousePosition(Common::Point mouse) {
bool ResVmSdlGraphicsManager::notifyMousePosition(Common::Point &mouse) {
transformMouseCoordinates(mouse);
// ResidualVM: not use that:
//setMousePos(mouse.x, mouse.y);

View file

@ -66,7 +66,7 @@ public:
void activateManager() override;
void deactivateManager() override;
void notifyVideoExpose() override;
bool notifyMousePosition(Common::Point mouse) override;
bool notifyMousePosition(Common::Point &mouse) override;
// GraphicsManager API - Features
void setFeatureState(OSystem::Feature f, bool enable) override;

View file

@ -97,7 +97,7 @@ public:
* @returns true if the mouse was in a valid position for the game and
* should cause the event to be sent to the game.
*/
virtual bool notifyMousePosition(Common::Point mouse) = 0;
virtual bool notifyMousePosition(Common::Point &mouse) = 0;
/**
* A (subset) of the graphic manager's state. This is used when switching