aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/gph
diff options
context:
space:
mode:
authorCameron Cawley2019-11-23 18:40:43 +0000
committerCameron Cawley2019-11-23 18:40:43 +0000
commita2110d36f91fcc9713fccd7a8ef95dc5ae5e907c (patch)
treecd42bb77e3e9c969048c02b3041a790852620b9a /backends/graphics/gph
parente04480d7002b8cb5577cf25be42f2187f829dd60 (diff)
downloadscummvm-rg350-a2110d36f91fcc9713fccd7a8ef95dc5ae5e907c.tar.gz
scummvm-rg350-a2110d36f91fcc9713fccd7a8ef95dc5ae5e907c.tar.bz2
scummvm-rg350-a2110d36f91fcc9713fccd7a8ef95dc5ae5e907c.zip
BACKENDS: Unify formatting between the GPH, Dingux and LinuxMoto backends
Diffstat (limited to 'backends/graphics/gph')
-rw-r--r--backends/graphics/gph/gph-graphics.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index cc8ef38f98..c54c6f26a5 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -272,7 +272,6 @@ void GPHGraphicsManager::internUpdateScreen() {
width = _videoMode.overlayWidth;
height = _videoMode.overlayHeight;
scalerProc = Normal1x;
-
scale1 = 1;
}
@@ -346,7 +345,7 @@ void GPHGraphicsManager::internUpdateScreen() {
assert(scalerProc != NULL);
- if ((_videoMode.mode == GFX_HALF) && (scalerProc == DownscaleAllByHalf)) {
+ if (_videoMode.mode == GFX_HALF && scalerProc == DownscaleAllByHalf) {
if (dst_x % 2 == 1) {
dst_x--;
dst_w++;
@@ -379,7 +378,6 @@ void GPHGraphicsManager::internUpdateScreen() {
r->x = dst_x;
r->y = dst_y;
-
#ifdef USE_SCALERS
if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
r->h = stretch200To240((uint8 *) _hwScreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1, _videoMode.filtering);
@@ -414,16 +412,16 @@ void GPHGraphicsManager::internUpdateScreen() {
void GPHGraphicsManager::showOverlay() {
if (_videoMode.mode == GFX_HALF) {
- _cursorX = _cursorX / 2;
- _cursorY = _cursorY / 2;
+ _cursorX /= 2;
+ _cursorY /= 2;
}
SurfaceSdlGraphicsManager::showOverlay();
}
void GPHGraphicsManager::hideOverlay() {
if (_videoMode.mode == GFX_HALF) {
- _cursorX = _cursorX * 2;
- _cursorY = _cursorY * 2;
+ _cursorX *= 2;
+ _cursorY *= 2;
}
SurfaceSdlGraphicsManager::hideOverlay();
}
@@ -502,8 +500,8 @@ bool GPHGraphicsManager::getFeatureState(OSystem::Feature f) const {
void GPHGraphicsManager::warpMouse(int x, int y) {
if (_cursorX != x || _cursorY != y) {
if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
- x = x / 2;
- y = y / 2;
+ x /= 2;
+ y /= 2;
}
}
SurfaceSdlGraphicsManager::warpMouse(x, y);