[Scummvm-git-logs] scummvm master -> 8170326b12a1aa022c4a3ad6d0c9cf20216108aa
grisenti
noreply at scummvm.org
Sat Oct 14 14:56:43 UTC 2023
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:
8170326b12 HPL1: Fix mouse movement in game menu
Commit: 8170326b12a1aa022c4a3ad6d0c9cf20216108aa
https://github.com/scummvm/scummvm/commit/8170326b12a1aa022c4a3ad6d0c9cf20216108aa
Author: grisenti (emanuele at grisenti.net)
Date: 2023-10-14T16:55:56+02:00
Commit Message:
HPL1: Fix mouse movement in game menu
Changed paths:
engines/hpl1/penumbra-overture/ButtonHandler.cpp
diff --git a/engines/hpl1/penumbra-overture/ButtonHandler.cpp b/engines/hpl1/penumbra-overture/ButtonHandler.cpp
index d07a8b749ae..ce2e18c967c 100644
--- a/engines/hpl1/penumbra-overture/ButtonHandler.cpp
+++ b/engines/hpl1/penumbra-overture/ButtonHandler.cpp
@@ -287,8 +287,10 @@ void cButtonHandler::Update(float afTimeStep) {
mpInit->mpMainMenu->OnMouseDoubleClick(eMButton_Left);
}
/// Mouse Movement
- cVector2f vRel = mpInput->GetMouse()->GetRelPosition();
- mpInit->mpMainMenu->AddMousePos(vRel * mfMouseSensitivity);
+ const auto virtualScreenSize = mpLowLevelGraphics->GetVirtualSize();
+ const auto screenSize = mpLowLevelGraphics->GetScreenSize();
+ const auto vRel = (mpInput->GetMouse()->GetAbsPosition() / screenSize) * virtualScreenSize;
+ mpInit->mpMainMenu->SetMousePos(vRel);
}
///////////////////////////////////
More information about the Scummvm-git-logs
mailing list