[Scummvm-git-logs] scummvm master -> e496918308022663120b738bf659e56e62e7ce18

digitall noreply at scummvm.org
Wed Jan 12 00:31:34 UTC 2022


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:
e496918308 HYPNO: Fix GCC Compiler Discarded Qualifier Warnings


Commit: e496918308022663120b738bf659e56e62e7ce18
    https://github.com/scummvm/scummvm/commit/e496918308022663120b738bf659e56e62e7ce18
Author: D G Turner (digitall at scummvm.org)
Date: 2022-01-12T00:30:43Z

Commit Message:
HYPNO: Fix GCC Compiler Discarded Qualifier Warnings

Changed paths:
    engines/hypno/hypno.cpp


diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index e3913721175..20426fd4f7c 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -418,21 +418,23 @@ void HypnoEngine::updateScreen(MVideo &video) {
 		g_system->getPaletteManager()->setPalette(videoPalette, 0, 256);
 	}
 
-	Graphics::Surface *sframe;
-
 	if (video.scaled) {
-		sframe = frame->scale(_screenW, _screenH);
-	} else
-		sframe = (Graphics::Surface*) frame;
+		Graphics::Surface *sframe = frame->scale(_screenW, _screenH);
 
-	if (video.transparent)
-		_compositeSurface->transBlitFrom(*sframe, video.position, _transparentColor);
-	else
-		_compositeSurface->blitFrom(*sframe, video.position);
+		if (video.transparent) {
+			_compositeSurface->transBlitFrom(*sframe, video.position, _transparentColor);
+		} else {
+			_compositeSurface->blitFrom(*sframe, video.position);
+		}
 
-	if (video.scaled) {
 		sframe->free();
 		delete sframe;
+	} else {
+		if (video.transparent) {
+			_compositeSurface->transBlitFrom(*frame, video.position, _transparentColor);
+		} else {
+			_compositeSurface->blitFrom(*frame, video.position);
+		}
 	}
 }
 




More information about the Scummvm-git-logs mailing list