[Scummvm-git-logs] scummvm master -> be3db5f0edb744f0409dba5ad64fc6bdb60d9324
aquadran
aquadran at gmail.com
Fri Oct 9 20:13:29 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
be3db5f0ed BACKENDS: Attempt to fix PS2 and SWITCH port
Commit: be3db5f0edb744f0409dba5ad64fc6bdb60d9324
https://github.com/scummvm/scummvm/commit/be3db5f0edb744f0409dba5ad64fc6bdb60d9324
Author: PaweÅ KoÅodziejski (aquadran at users.sourceforge.net)
Date: 2020-10-09T22:12:37+02:00
Commit Message:
BACKENDS: Attempt to fix PS2 and SWITCH port
Changed paths:
backends/events/psp2sdl/psp2sdl-events.cpp
backends/events/switchsdl/switchsdl-events.cpp
diff --git a/backends/events/psp2sdl/psp2sdl-events.cpp b/backends/events/psp2sdl/psp2sdl-events.cpp
index b5583b7853..220665946e 100644
--- a/backends/events/psp2sdl/psp2sdl-events.cpp
+++ b/backends/events/psp2sdl/psp2sdl-events.cpp
@@ -226,8 +226,8 @@ void PSP2EventSource::preprocessFingerMotion(SDL_Event *event) {
if (numFingersDown >= 1) {
int x = _mouseX;
int y = _mouseY;
- int xMax = _graphicsManager->getWindowWidth() - 1;
- int yMax = _graphicsManager->getWindowHeight() - 1;
+ int xMax = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowWidth() - 1;
+ int yMax = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowHeight() - 1;
if (port == 0 && !ConfMan.getBool("frontpanel_touchpad_mode")) {
convertTouchXYToGameXY(event->tfinger.x, event->tfinger.y, &x, &y);
@@ -379,8 +379,8 @@ void PSP2EventSource::preprocessFingerMotion(SDL_Event *event) {
}
void PSP2EventSource::convertTouchXYToGameXY(float touchX, float touchY, int *gameX, int *gameY) {
- int screenH = _graphicsManager->getWindowHeight();
- int screenW = _graphicsManager->getWindowWidth();
+ int screenH = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowHeight;
+ int screenW = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowWidth();
const int dispW = TOUCHSCREEN_WIDTH;
const int dispH = TOUCHSCREEN_HEIGHT;
diff --git a/backends/events/switchsdl/switchsdl-events.cpp b/backends/events/switchsdl/switchsdl-events.cpp
index bac16963fb..2f0f639387 100644
--- a/backends/events/switchsdl/switchsdl-events.cpp
+++ b/backends/events/switchsdl/switchsdl-events.cpp
@@ -220,8 +220,8 @@ void SwitchEventSource::preprocessFingerMotion(SDL_Event *event) {
if (numFingersDown >= 1) {
int x = _mouseX;
int y = _mouseY;
- int xMax = _graphicsManager->getWindowWidth() - 1;
- int yMax = _graphicsManager->getWindowHeight() - 1;
+ int xMax = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowWidth() - 1;
+ int yMax = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowHeight() - 1;
if (port == 0 && !ConfMan.getBool("touchpad_mouse_mode")) {
convertTouchXYToGameXY(event->tfinger.x, event->tfinger.y, &x, &y);
@@ -353,8 +353,8 @@ void SwitchEventSource::preprocessFingerMotion(SDL_Event *event) {
}
void SwitchEventSource::convertTouchXYToGameXY(float touchX, float touchY, int *gameX, int *gameY) {
- int screenH = _graphicsManager->getWindowHeight();
- int screenW = _graphicsManager->getWindowWidth();
+ int screenH = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowHeight();
+ int screenW = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowWidth();
const int dispW = TOUCHSCREEN_WIDTH;
const int dispH = TOUCHSCREEN_HEIGHT;
More information about the Scummvm-git-logs
mailing list