[ scummvm-Patches-1595026 ] engine init/shutdown OSystem methods

SourceForge.net noreply at sourceforge.net
Sun Nov 12 13:01:56 CET 2006


Patches item #1595026, was opened at 2006-11-12 14:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1595026&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Kostas Nakos (knakos)
Assigned to: Max Horn (fingolfin)
Summary: engine init/shutdown OSystem methods

Initial Comment:
purpose: The backends get a chance to init/de-init 
specifically for the engine being brought up/shutdown.

practical reasoning: The ce backend creates the audio 
device just before the engine starts, so that the 
mixing rate matches the ogg/mp3 playback rate, 
supposedly for performance reasons. The way it was 
currently being done, was that the SetWindowCaption 
OSystem method (!) was overloaded. By taking a look at 
RunGame, we see that it's one of the last OSystem 
calls before engine->init and run. The gameid has been 
set at this point, so the backend can check out what 
engine is coming up. This is tacky to say the least. 
Enclosing engine init+go with two system->engineinit/
done calls is much cleaner. I have no use for the 
engineDone but it's there for symmetry.

possible future use: this scheme could be useful when/
if we implement the quit+return to launcher capability.

In current svn for ce, I'm still using the 
windowcaption overload to cleanly build.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1595026&group_id=37116




More information about the Scummvm-tracker mailing list