[Scummvm-cvs-logs] SF.net SVN: scummvm:[41513] scummvm/branches/gsoc2009-draci/engines/draci/ draci.cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Jun 14 15:49:28 CEST 2009


Revision: 41513
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41513&view=rev
Author:   sev
Date:     2009-06-14 13:49:28 +0000 (Sun, 14 Jun 2009)

Log Message:
-----------
Replace hackish getch() with proper event loop at end of the demo.

Modified Paths:
--------------
    scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp

Modified: scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp	2009-06-14 13:41:12 UTC (rev 41512)
+++ scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp	2009-06-14 13:49:28 UTC (rev 41513)
@@ -170,7 +170,20 @@
 		debugC(5, kDraciGeneralDebugLevel, "Finished frame %d", t);	
 	}	
 
-	getchar();
+	Common::Event event;
+	bool quit = false;
+	while (!quit) {
+		while (_eventMan->pollEvent(event)) {
+			switch (event.type) {
+			case Common::EVENT_QUIT:
+				quit = true;
+			default:
+				break;
+			}
+		}
+		_system->updateScreen();
+		_system->delayMillis(20);
+	}
 
 	return 0;
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list