diff options
author | Johannes Schickel | 2011-08-08 23:56:54 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-08-09 00:03:11 +0200 |
commit | 04ab0e58b4142bf58db2180a2bac6897821d069f (patch) | |
tree | 90d2ac00281dddf627a72b4ceb6e1add0c5960fd /backends/graphics/gph/gph-graphics.cpp | |
parent | 0630a88a04e9688d664751b6a68edf622d76b348 (diff) | |
download | scummvm-rg350-04ab0e58b4142bf58db2180a2bac6897821d069f.tar.gz scummvm-rg350-04ab0e58b4142bf58db2180a2bac6897821d069f.tar.bz2 scummvm-rg350-04ab0e58b4142bf58db2180a2bac6897821d069f.zip |
SDL: Take advantage of SdlGraphicsManager.
This gets rid of the hacks, where SdlEventSource added events with custom type
numbers to pass SDL_VIDEOEXPOSE and SDL_VIDEORESIZE to the graphics manager.
Furthermore it get rids of the uninituitive and hard to trace way of assigning
the proper mouse coordinates to mouse related events. Formerly it passed the
real screen coordinates through the even dispatching api to the graphics
manager (at least hopefully ;-) and let that handle creating a new event with
the proper coordinates. Now instead SdlEventSource handles the proper
coordinate setup itself.
Since this is a behavior change and I can not test all the SDL based small
devices ports this commit might break compilation for them and more serve it
might also break mouse position behavior. If any of that occurs I am sorry
about it.
Diffstat (limited to 'backends/graphics/gph/gph-graphics.cpp')
-rw-r--r-- | backends/graphics/gph/gph-graphics.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 12643fbff8..2e8bfa668e 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -579,15 +579,6 @@ 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; - transformMouseCoordinates(newEvent.mouse); - g_system->getEventManager()->pushEvent(newEvent); - } -} - void GPHGraphicsManager::transformMouseCoordinates(Common::Point &point) { if (!_overlayVisible) { if (_videoMode.mode == GFX_HALF) { |