[Scummvm-cvs-logs] scummvm master -> 8112247f1ad3653a157a3fa0fa43271622a3433d

eriktorbjorn eriktorbjorn at telia.com
Sun May 15 23:28:34 CEST 2011


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:
8112247f1a TSAGE: Made some dialogs less CPU hungry


Commit: 8112247f1ad3653a157a3fa0fa43271622a3433d
    https://github.com/scummvm/scummvm/commit/8112247f1ad3653a157a3fa0fa43271622a3433d
Author: eriktorbjorn (eriktorbjorn at users.sourceforge.net)
Date: 2011-05-15T14:20:40-07:00

Commit Message:
TSAGE: Made some dialogs less CPU hungry

The start/intro dialog, the inventory dialog and the conversation
dialog now call delayMillis() in their event loop. This is
consistent with how the action menu dialog already worked.

Changed paths:
    engines/tsage/converse.cpp
    engines/tsage/dialogs.cpp
    engines/tsage/graphics.cpp



diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index b1e318c..5fa3614 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -418,8 +418,10 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
 	Event event;
 	while (!_vm->getEventManager()->shouldQuit()) {
 		while (!_globals->_events.getEvent(event, EVENT_KEYPRESS | EVENT_BUTTON_DOWN | EVENT_MOUSE_MOVE) &&
-				!_vm->getEventManager()->shouldQuit())
-			;
+				!_vm->getEventManager()->shouldQuit()) {
+			g_system->delayMillis(10);
+			g_system->updateScreen();
+		}
 		if (_vm->getEventManager()->shouldQuit())
 			break;
 
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp
index fa9c73d..759deeb 100644
--- a/engines/tsage/dialogs.cpp
+++ b/engines/tsage/dialogs.cpp
@@ -468,8 +468,10 @@ void InventoryDialog::execute() {
 	while (!_vm->getEventManager()->shouldQuit()) {
 		// Get events
 		Event event;
-		while (!_globals->_events.getEvent(event) && !_vm->getEventManager()->shouldQuit())
-			;
+		while (!_globals->_events.getEvent(event) && !_vm->getEventManager()->shouldQuit()) {
+			g_system->delayMillis(10);
+			g_system->updateScreen();
+		}
 		if (_vm->getEventManager()->shouldQuit())
 			return;
 
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 1b2e6b1..5da00e8 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -991,6 +991,8 @@ GfxButton *GfxDialog::execute(GfxButton *defaultButton) {
 				break;
 			}
 		}
+		g_system->delayMillis(10);
+		g_system->updateScreen();
 	}
 
 	_gfxManager.deactivate();






More information about the Scummvm-git-logs mailing list