mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-21 01:05:59 +00:00
TWINE: fixed endless magic ball action when console was activated
related to https://bugs.scummvm.org/ticket/13675
This commit is contained in:
parent
9d6562189d
commit
796f54ff89
@ -78,6 +78,16 @@ TwinEConsole::TwinEConsole(TwinEEngine *engine) : _engine(engine), GUI::Debugger
|
||||
TwinEConsole::~TwinEConsole() {
|
||||
}
|
||||
|
||||
void TwinEConsole::preEnter() {
|
||||
_engine->_input->resetActionStates();
|
||||
Super::preEnter();
|
||||
}
|
||||
|
||||
void TwinEConsole::postEnter() {
|
||||
_engine->_input->resetActionStates();
|
||||
Super::postEnter();
|
||||
}
|
||||
|
||||
#define TOGGLE_DEBUG(var, description) \
|
||||
if ((var)) { \
|
||||
debugPrintf("Disabling " description); \
|
||||
|
@ -31,6 +31,7 @@ class TwinEEngine;
|
||||
|
||||
class TwinEConsole : public GUI::Debugger {
|
||||
private:
|
||||
using Super = GUI::Debugger;
|
||||
TwinEEngine *_engine;
|
||||
|
||||
bool doToggleSceneryView(int argc, const char **argv);
|
||||
@ -70,6 +71,10 @@ private:
|
||||
bool doDumpFile(int argc, const char **argv);
|
||||
bool doSetHolomapTrajectory(int argc, const char **argv);
|
||||
|
||||
protected:
|
||||
void preEnter() override;
|
||||
void postEnter() override;
|
||||
|
||||
public:
|
||||
TwinEConsole(TwinEEngine *engine);
|
||||
~TwinEConsole() override;
|
||||
|
@ -62,6 +62,12 @@ bool Input::toggleActionIfActive(TwinEActionType actionType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Input::resetActionStates() {
|
||||
for (int i = 0; i < TwinEActionType::Max; ++i) {
|
||||
_actionStates[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool Input::toggleAbortAction() {
|
||||
bool abortState = false;
|
||||
abortState |= toggleActionIfActive(TwinEActionType::CutsceneAbort);
|
||||
|
@ -143,6 +143,7 @@ public:
|
||||
* @c true anymore
|
||||
*/
|
||||
bool toggleActionIfActive(TwinEActionType actionType);
|
||||
void resetActionStates();
|
||||
|
||||
bool toggleAbortAction();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user