From 960a787c033fa7a90d347b9d37c4c0e890444ce2 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 8 Dec 2014 07:55:47 +0100 Subject: ACCESS: Reduce the scope of a variable in Inventory --- engines/access/inventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/access') diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp index 78a85c3257..4038929a67 100644 --- a/engines/access/inventory.cpp +++ b/engines/access/inventory.cpp @@ -318,13 +318,13 @@ void InventoryManager::putInvIcon(int itemIndex, int itemId) { void InventoryManager::chooseItem() { EventsManager &events = *_vm->_events; _vm->_useItem = -1; - int selIndex; while (!_vm->shouldQuit()) { // Check for events events.pollEvents(); g_system->delayMillis(10); + int selIndex; // Poll events and wait for a click on a known area if (!events._leftButton || ((selIndex = coordIndexOf()) == -1)) continue; -- cgit v1.2.3