From 7c1df4cbff0fc63123f907741ca1c5fefc1af791 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 22 Jul 2009 11:48:51 +0000 Subject: Fix bug #2823762: "AGI: PQ1 All function keys are broken after restart" svn-id: r42658 --- engines/agi/agi.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index e373dd3e6d..531b0a4ffd 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -489,11 +489,6 @@ int AgiEngine::agiInit() { _game.mouseFence.setWidth(0); // Reset - _game.lastController = 0; - for (i = 0; i < MAX_DIRS; i++) - _game.controllerOccured[i] = false; - - return ec; } @@ -718,6 +713,12 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas _predictiveDictLine = NULL; _predictiveDictLineCount = 0; _firstSlot = 0; + + // NOTE: On game reload the keys do not get set again, + // thus it is incorrect to reset it in agiInit(). Fixes bug #2823762 + _game.lastController = 0; + for (int i = 0; i < MAX_DIRS; i++) + _game.controllerOccured[i] = false; } void AgiEngine::initialize() { -- cgit v1.2.3