[Scummvm-git-logs] scummvm master -> 0020c73ecbaf5333c92742f74670046a5f13bf0e
aquadran
noreply at scummvm.org
Sat Jul 16 08:43:02 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:
0020c73ecb WINTERMUTE: Make variable _useD3D depends on used renderer.
Commit: 0020c73ecbaf5333c92742f74670046a5f13bf0e
https://github.com/scummvm/scummvm/commit/0020c73ecbaf5333c92742f74670046a5f13bf0e
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-07-16T10:42:57+02:00
Commit Message:
WINTERMUTE: Make variable _useD3D depends on used renderer.
Changed paths:
engines/wintermute/base/base_game.cpp
engines/wintermute/platform_osystem.cpp
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index 64a8ce1dac3..208970010f9 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -558,6 +558,7 @@ bool BaseGame::initialize2() { // we know whether we are going to be accelerated
warning("3D software renderer is not supported yet");
}
}
+ _useD3D = _renderer3D != nullptr;
_renderer = _renderer3D;
if (!_renderer && !_playing3DGame) {
diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp
index 938565110ad..df99e874644 100644
--- a/engines/wintermute/platform_osystem.cpp
+++ b/engines/wintermute/platform_osystem.cpp
@@ -157,12 +157,14 @@ bool BasePlatform::getCursorPos(Point32 *lpPoint) {
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);
+#ifndef ENABLE_WME3D
+ if (!_gameRef->_useD3D) {
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
+ renderer->pointFromScreen(lpPoint);
+ }
#endif
return true;
@@ -174,9 +176,14 @@ bool BasePlatform::setCursorPos(int x, int y) {
p.x = x;
p.y = y;
+ // 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);
- renderer->pointToScreen(&p);
+ if (!_gameRef->_useD3D) {
+ BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
+ renderer->pointToScreen(&p);
+ }
#endif
g_system->warpMouse(x, y);
More information about the Scummvm-git-logs
mailing list