diff options
-rw-r--r-- | backends/platform/samsungtv/events.cpp | 98 | ||||
-rw-r--r-- | backends/platform/samsungtv/graphics.cpp | 16 | ||||
-rw-r--r-- | backends/platform/samsungtv/samsungtv.h | 7 |
3 files changed, 0 insertions, 121 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:{ diff --git a/backends/platform/samsungtv/graphics.cpp b/backends/platform/samsungtv/graphics.cpp index a613e2b66a..393c4a2515 100644 --- a/backends/platform/samsungtv/graphics.cpp +++ b/backends/platform/samsungtv/graphics.cpp @@ -66,20 +66,4 @@ void OSystem_SDL_SamsungTV::internUpdateScreen() { SDL_UpdateRect(_realhwscreen, 0, 0, 0, 0); } -void OSystem_SDL_SamsungTV::warpMouse(int x, int y) { - int y1 = y; - - if (_videoMode.aspectRatioCorrection && !_overlayVisible) - y1 = real2Aspect(y); - - if (_mouseCurState.x != x || _mouseCurState.y != y) { - if (!_overlayVisible) - generateMouseMoveEvent(x * _videoMode.scaleFactor, y1 * _videoMode.scaleFactor); - else - generateMouseMoveEvent(x, y1); - - setMousePos(x, y); - } -} - #endif diff --git a/backends/platform/samsungtv/samsungtv.h b/backends/platform/samsungtv/samsungtv.h index 8ef1e927e9..ed1d59f711 100644 --- a/backends/platform/samsungtv/samsungtv.h +++ b/backends/platform/samsungtv/samsungtv.h @@ -41,10 +41,6 @@ class OSystem_SDL_SamsungTV : public OSystem_SDL { public: OSystem_SDL_SamsungTV(); - virtual void warpMouse(int x, int y); - - virtual bool pollEvent(Common::Event &event); - virtual bool hasFeature(Feature f); virtual void setFeatureState(Feature f, bool enable); virtual bool getFeatureState(Feature f); @@ -59,9 +55,6 @@ protected: virtual void unloadGFXMode(); virtual bool hotswapGFXMode(); - void handleKbdMouse(); - void generateMouseMoveEvent(int x, int y); - virtual bool remapKey(SDL_Event &ev, Common::Event &event); }; |