[Scummvm-git-logs] scummvm master -> 928c40da7190cb15dc567c87099ae98e41c690be

aquadran noreply at scummvm.org
Sat Jun 25 21:51:54 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:
928c40da71 WINTERMUTE: WME3D: Moved code into one ifdef condition


Commit: 928c40da7190cb15dc567c87099ae98e41c690be
    https://github.com/scummvm/scummvm/commit/928c40da7190cb15dc567c87099ae98e41c690be
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-06-25T23:51:49+02:00

Commit Message:
WINTERMUTE: WME3D: Moved code into one ifdef condition

Changed paths:
    engines/wintermute/platform_osystem.cpp


diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp
index af5c6f19ce0..938565110ad 100644
--- a/engines/wintermute/platform_osystem.cpp
+++ b/engines/wintermute/platform_osystem.cpp
@@ -153,18 +153,15 @@ void BasePlatform::handleEvent(Common::Event *event) {
 // Win32 API bindings
 //////////////////////////////////////////////////////////////////////////
 bool BasePlatform::getCursorPos(Point32 *lpPoint) {
-	// in 3d mode we take the mouse postion as is for now
-	// this seems to give the right results
-	// actually, BaseRenderer has no functions pointFromScreen/pointToScreen anyways
-#ifndef ENABLE_WME3D
-	BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
-
-#endif
 	Common::Point p = g_system->getEventManager()->getMousePos();
 	lpPoint->x = p.x;
 	lpPoint->y = p.y;
 
 #ifndef ENABLE_WME3D
+	// in 3d mode we take the mouse postion as is for now
+	// this seems to give the right results
+	// actually, BaseRenderer has no functions pointFromScreen/pointToScreen anyways
+	BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
 	renderer->pointFromScreen(lpPoint);
 #endif
 
@@ -173,15 +170,12 @@ bool BasePlatform::getCursorPos(Point32 *lpPoint) {
 
 //////////////////////////////////////////////////////////////////////////
 bool BasePlatform::setCursorPos(int x, int y) {
-#ifndef ENABLE_WME3D
-	BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
-
-#endif
 	Point32 p;
 	p.x = x;
 	p.y = y;
 
 #ifndef ENABLE_WME3D
+	BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
 	renderer->pointToScreen(&p);
 #endif
 




More information about the Scummvm-git-logs mailing list