aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/gph/gph-graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/gph/gph-graphics.cpp')
-rw-r--r--backends/graphics/gph/gph-graphics.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index 82a32203fb..96b0619a6a 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -141,7 +141,7 @@ void GPHGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *f
if (w > 320 || h > 240){
setGraphicsMode(GFX_HALF);
setGraphicsModeIntern();
- _sdlEventSource->toggleMouseGrab();
+ _eventSource->toggleMouseGrab();
}
_videoMode.overlayWidth = 320;
@@ -579,21 +579,16 @@ void GPHGraphicsManager::warpMouse(int x, int y) {
SurfaceSdlGraphicsManager::warpMouse(x, y);
}
-void GPHGraphicsManager::adjustMouseEvent(const Common::Event &event) {
- if (!event.synthetic) {
- Common::Event newEvent(event);
- newEvent.synthetic = true;
- if (!_overlayVisible) {
- if (_videoMode.mode == GFX_HALF) {
- newEvent.mouse.x *= 2;
- newEvent.mouse.y *= 2;
- }
- newEvent.mouse.x /= _videoMode.scaleFactor;
- newEvent.mouse.y /= _videoMode.scaleFactor;
- if (_videoMode.aspectRatioCorrection)
- newEvent.mouse.y = aspect2Real(newEvent.mouse.y);
+void GPHGraphicsManager::transformMouseCoordinates(Common::Point &point) {
+ if (!_overlayVisible) {
+ if (_videoMode.mode == GFX_HALF) {
+ point.x *= 2;
+ point.y *= 2;
}
- g_system->getEventManager()->pushEvent(newEvent);
+ point.x /= _videoMode.scaleFactor;
+ point.y /= _videoMode.scaleFactor;
+ if (_videoMode.aspectRatioCorrection)
+ point.y = aspect2Real(point.y);
}
}