diff options
author | Paweł Kołodziejski | 2009-11-16 21:27:09 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2009-11-16 21:27:09 +0000 |
commit | 836e5c088eb0edbd224a27816768a0c6eda3c6cb (patch) | |
tree | 98ed96651c0d37ebe1e0933d516d9fca317a6f24 /backends/platform/samsungtv/events.cpp | |
parent | 09cdfac8c4e3ec7b0780292c0403a2de384bb95d (diff) | |
download | scummvm-rg350-836e5c088eb0edbd224a27816768a0c6eda3c6cb.tar.gz scummvm-rg350-836e5c088eb0edbd224a27816768a0c6eda3c6cb.tar.bz2 scummvm-rg350-836e5c088eb0edbd224a27816768a0c6eda3c6cb.zip |
samsungtv: no need workaround to subclasses, alternate sdl static library works fine
svn-id: r45940
Diffstat (limited to 'backends/platform/samsungtv/events.cpp')
-rw-r--r-- | backends/platform/samsungtv/events.cpp | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/backends/platform/samsungtv/events.cpp b/backends/platform/samsungtv/events.cpp index ad0775e726..08039eaa1f 100644 --- a/backends/platform/samsungtv/events.cpp +++ b/backends/platform/samsungtv/events.cpp @@ -29,104 +29,6 @@ #if defined(SAMSUNGTV) -void OSystem_SDL_SamsungTV::generateMouseMoveEvent(int x, int y) { - SDL_Event event; - memset(&event, 0, sizeof(event)); - event.type = SDL_MOUSEMOTION; - event.motion.x = x; - event.motion.y = y; - SDL_PushEvent(&event); -} - -void OSystem_SDL_SamsungTV::handleKbdMouse() { - uint32 curTime = getMillis(); - if (curTime >= _km.last_time + _km.delay_time) { - _km.last_time = curTime; - if (_km.x_down_count == 1) { - _km.x_down_time = curTime; - _km.x_down_count = 2; - } - if (_km.y_down_count == 1) { - _km.y_down_time = curTime; - _km.y_down_count = 2; - } - - if (_km.x_vel || _km.y_vel) { - if (_km.x_down_count) { - if (curTime > _km.x_down_time + _km.delay_time * 12) { - if (_km.x_vel > 0) - _km.x_vel++; - else - _km.x_vel--; - } else if (curTime > _km.x_down_time + _km.delay_time * 8) { - if (_km.x_vel > 0) - _km.x_vel = 5; - else - _km.x_vel = -5; - } - } - if (_km.y_down_count) { - if (curTime > _km.y_down_time + _km.delay_time * 12) { - if (_km.y_vel > 0) - _km.y_vel++; - else - _km.y_vel--; - } else if (curTime > _km.y_down_time + _km.delay_time * 8) { - if (_km.y_vel > 0) - _km.y_vel = 5; - else - _km.y_vel = -5; - } - } - - _km.x += _km.x_vel; - _km.y += _km.y_vel; - - if (_km.x < 0) { - _km.x = 0; - _km.x_vel = -1; - _km.x_down_count = 1; - } else if (_km.x > _km.x_max) { - _km.x = _km.x_max; - _km.x_vel = 1; - _km.x_down_count = 1; - } - - if (_km.y < 0) { - _km.y = 0; - _km.y_vel = -1; - _km.y_down_count = 1; - } else if (_km.y > _km.y_max) { - _km.y = _km.y_max; - _km.y_vel = 1; - _km.y_down_count = 1; - } - - generateMouseMoveEvent(_km.x, _km.y); - } - } -} - -bool OSystem_SDL_SamsungTV::pollEvent(Common::Event &event) { - SDL_Event ev; - - handleKbdMouse(); - - // If the screen mode changed, send an Common::EVENT_SCREEN_CHANGED - if (_modeChanged) { - _modeChanged = false; - event.type = Common::EVENT_SCREEN_CHANGED; - return true; - } - - while (SDL_PollEvent(&ev)) { - preprocessEvents(&ev); - if (dispatchSDLEvent(ev, event)) - return true; - } - return false; -} - bool OSystem_SDL_SamsungTV::remapKey(SDL_Event &ev, Common::Event &event) { switch (ev.type) { case SDL_KEYDOWN:{ |