[Scummvm-git-logs] scummvm master -> e20bddb738191ae9bed8a52b4bb6c2562c83e848
aquadran
aquadran at gmail.com
Sat Oct 10 11:55:36 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:
e20bddb738 BACKENDS: Attempt to fix PSP and SWITCH ports. Use proper class cast
Commit: e20bddb738191ae9bed8a52b4bb6c2562c83e848
https://github.com/scummvm/scummvm/commit/e20bddb738191ae9bed8a52b4bb6c2562c83e848
Author: PaweÅ KoÅodziejski (aquadran at users.sourceforge.net)
Date: 2020-10-10T13:55:27+02:00
Commit Message:
BACKENDS: Attempt to fix PSP and SWITCH ports. Use proper class cast
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 220665946e..2a14df2e24 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 = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowWidth() - 1;
- int yMax = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowHeight() - 1;
+ int xMax = dynamic_cast<WindowedGraphicsManager *>(_graphicsManager)->getWindowWidth() - 1;
+ int yMax = dynamic_cast<WindowedGraphicsManager *>(_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 = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowHeight;
- int screenW = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowWidth();
+ int screenH = dynamic_cast<WindowedGraphicsManager *>(_graphicsManager)->getWindowHeight;
+ int screenW = dynamic_cast<WindowedGraphicsManager *>(_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 2f0f639387..6bab141ad8 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 = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowWidth() - 1;
- int yMax = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowHeight() - 1;
+ int xMax = dynamic_cast<WindowedGraphicsManager *>(_graphicsManager)->getWindowWidth() - 1;
+ int yMax = dynamic_cast<WindowedGraphicsManager *>(_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 = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowHeight();
- int screenW = dynamic_cast<SdlGraphicsManager *>(_graphicsManager)->getWindowWidth();
+ int screenH = dynamic_cast<WindowedGraphicsManager *>(_graphicsManager)->getWindowHeight();
+ int screenW = dynamic_cast<WindowedGraphicsManager *>(_graphicsManager)->getWindowWidth();
const int dispW = TOUCHSCREEN_WIDTH;
const int dispH = TOUCHSCREEN_HEIGHT;
More information about the Scummvm-git-logs
mailing list