diff options
author | Alejandro Marzini | 2010-07-15 01:21:20 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-15 01:21:20 +0000 |
commit | f53028d4a2d53238fb92e56bea6c737c57ffb123 (patch) | |
tree | 84f473bce0f643519a0ef7985619c25f731d8421 /backends/events | |
parent | 84ceae932852fe684ea553daee712b52da83add6 (diff) | |
download | scummvm-rg350-f53028d4a2d53238fb92e56bea6c737c57ffb123.tar.gz scummvm-rg350-f53028d4a2d53238fb92e56bea6c737c57ffb123.tar.bz2 scummvm-rg350-f53028d4a2d53238fb92e56bea6c737c57ffb123.zip |
Replaced the extra SDL functions added to GraphicsManager with an EventObserver in SdlGraphicsManager.
svn-id: r50900
Diffstat (limited to 'backends/events')
-rw-r--r-- | backends/events/sdl/sdl-events.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp index df9efe54b1..0fa7c1d8ab 100644 --- a/backends/events/sdl/sdl-events.cpp +++ b/backends/events/sdl/sdl-events.cpp @@ -102,9 +102,6 @@ void SdlEventManager::fillMouseEvent(Common::Event &event, int x, int y) { // Update the "keyboard mouse" coords _km.x = x; _km.y = y; - - // Adjust for the screen scaling - ((OSystem_SDL *)g_system)->getGraphicsManager()->adjustMouseEvent(event); } void SdlEventManager::handleKbdMouse() { @@ -241,10 +238,6 @@ bool SdlEventManager::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) { case SDL_JOYAXISMOTION: return handleJoyAxisMotion(ev, event); - case SDL_VIDEOEXPOSE: - ((OSystem_SDL *) g_system)->getGraphicsManager()->forceFullRedraw(); - break; - case SDL_QUIT: event.type = Common::EVENT_QUIT; return true; @@ -266,32 +259,6 @@ bool SdlEventManager::handleKeyDown(SDL_Event &ev, Common::Event &event) { if (_scrollLock) event.kbd.flags |= Common::KBD_SCRL; - // Alt-Return and Alt-Enter toggle full screen mode - if (event.kbd.hasFlags(Common::KBD_ALT) && (ev.key.keysym.sym == SDLK_RETURN || ev.key.keysym.sym == SDLK_KP_ENTER)) { - ((OSystem_SDL *) g_system)->getGraphicsManager()->toggleFullScreen(); - return false; - } - - // Alt-S: Create a screenshot - if (event.kbd.hasFlags(Common::KBD_ALT) && ev.key.keysym.sym == 's') { - char filename[20]; - - for (int n = 0;; n++) { - SDL_RWops *file; - - sprintf(filename, "scummvm%05d.bmp", n); - file = SDL_RWFromFile(filename, "r"); - if (!file) - break; - SDL_RWclose(file); - } - if (((OSystem_SDL *) g_system)->getGraphicsManager()->saveScreenshot(filename)) - printf("Saved '%s'\n", filename); - else - printf("Could not save screenshot!\n"); - return false; - } - // Ctrl-m toggles mouse capture if (event.kbd.hasFlags(Common::KBD_CTRL) && ev.key.keysym.sym == 'm') { toggleMouseGrab(); @@ -323,12 +290,6 @@ bool SdlEventManager::handleKeyDown(SDL_Event &ev, Common::Event &event) { return true; } - // Ctrl-Alt-<key> will change the GFX mode - if ((event.kbd.flags & (Common::KBD_CTRL|Common::KBD_ALT)) == (Common::KBD_CTRL|Common::KBD_ALT)) { - if (((OSystem_SDL *) g_system)->getGraphicsManager()->handleScalerHotkeys((Common::KeyCode)ev.key.keysym.sym)) - return false; - } - if (remapKey(ev, event)) return true; @@ -354,10 +315,6 @@ bool SdlEventManager::handleKeyUp(SDL_Event &ev, Common::Event &event) { if (_scrollLock) event.kbd.flags |= Common::KBD_SCRL; - if (((OSystem_SDL *) g_system)->getGraphicsManager()->isScalerHotkey(event)) - // Swallow these key up events - return false; - return true; } @@ -365,7 +322,6 @@ bool SdlEventManager::handleMouseMotion(SDL_Event &ev, Common::Event &event) { event.type = Common::EVENT_MOUSEMOVE; fillMouseEvent(event, ev.motion.x, ev.motion.y); - ((OSystem_SDL *) g_system)->getGraphicsManager()->setMousePos(event.mouse.x, event.mouse.y); return true; } |