[Scummvm-git-logs] scummvm master -> 27e06f4ef9b67a9a9fde36b941996b9af25b5926
grisenti
noreply at scummvm.org
Wed Dec 28 21:14:38 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:
27e06f4ef9 HPL1: allow input unlocking through config file option
Commit: 27e06f4ef9b67a9a9fde36b941996b9af25b5926
https://github.com/scummvm/scummvm/commit/27e06f4ef9b67a9a9fde36b941996b9af25b5926
Author: grisenti (emanuele at grisenti.net)
Date: 2022-12-28T22:14:25+01:00
Commit Message:
HPL1: allow input unlocking through config file option
Changed paths:
engines/hpl1/penumbra-overture/ButtonHandler.cpp
engines/hpl1/penumbra-overture/Init.cpp
engines/hpl1/penumbra-overture/Init.h
diff --git a/engines/hpl1/penumbra-overture/ButtonHandler.cpp b/engines/hpl1/penumbra-overture/ButtonHandler.cpp
index bcb12e4f465..067aef2856b 100644
--- a/engines/hpl1/penumbra-overture/ButtonHandler.cpp
+++ b/engines/hpl1/penumbra-overture/ButtonHandler.cpp
@@ -107,7 +107,7 @@ static constexpr cButtonHandlerAction gvDefaultActions[] = {
#ifdef __APPLE__
{"QuitGame", "Keyboard", eKeyModifier_META | eKey_q, false},
#endif
- //{"LockInput","Keyboard",eKey_k,false},
+ {"LockInput","Keyboard", eKey_k, false},
{"Screenshot", "Keyboard", eKey_F12, false},
//{"Hit","Keyboard",eKey_h,false},
@@ -219,11 +219,9 @@ void cButtonHandler::Update(float afTimeStep) {
mpInit->mpGame->GetGraphics()->GetLowLevel()->SaveScreenToBMP(sFileName);
}
- if (mpInput->BecameTriggerd("LockInput")) {
-#ifndef WIN32
+ if (mpInit->_allowInputUnlock && mpInput->BecameTriggerd("LockInput")) {
bLockState = !bLockState;
mpInit->mpGame->GetInput()->GetLowLevel()->LockInput(bLockState);
-#endif
}
///////////////////////////////////
// DEMO END TEXT
diff --git a/engines/hpl1/penumbra-overture/Init.cpp b/engines/hpl1/penumbra-overture/Init.cpp
index 620ef18eb6e..b7c49bfcf92 100644
--- a/engines/hpl1/penumbra-overture/Init.cpp
+++ b/engines/hpl1/penumbra-overture/Init.cpp
@@ -173,6 +173,7 @@ bool cInit::Init(tString saveToLoad) {
mbSimpleWeaponSwing = getBoolConfig("simple_weapon_swing", false);
mbDisablePersonalNotes = getBoolConfig("disable_personal_notes", false);
mbAllowQuickSave = getBoolConfig("allow_quick_save", false);
+ _allowInputUnlock = getBoolConfig("allow_input_unlock", false);
mbFlashItems = getBoolConfig("flash_items", true);
mbShowCrossHair = getBoolConfig("show_crosshair", false);
@@ -582,6 +583,7 @@ void cInit::Exit() {
ConfMan.setBool("simple_weapon_swing", mbSimpleWeaponSwing);
ConfMan.setBool("disable_personal_notes", mbDisablePersonalNotes);
ConfMan.setBool("allow_quick_save", mbAllowQuickSave);
+ ConfMan.setBool("allow_input_unlock", _allowInputUnlock);
ConfMan.setBool("flash_tems", mbFlashItems);
ConfMan.setBool("show_crosshair", mbShowCrossHair);
diff --git a/engines/hpl1/penumbra-overture/Init.h b/engines/hpl1/penumbra-overture/Init.h
index a9cfbf7bb2f..6b25509f6ba 100644
--- a/engines/hpl1/penumbra-overture/Init.h
+++ b/engines/hpl1/penumbra-overture/Init.h
@@ -138,6 +138,7 @@ public:
bool mbSimpleWeaponSwing;
bool mbDisablePersonalNotes;
bool mbAllowQuickSave;
+ bool _allowInputUnlock;
bool mbFlashItems;
bool mbSimpleSwingInOptions;
bool mbShowCrossHair;
More information about the Scummvm-git-logs
mailing list