Prevent infinite loop by displaying the launcher after a game start FAILURE too.

svn-id: r15787
This commit is contained in:
James Brown 2004-11-11 14:01:11 +00:00
parent 1f7ccd0293
commit cb4b3c1f7e
3 changed files with 10 additions and 7 deletions

View File

@ -233,7 +233,6 @@ static int launcherDialog(GameDetector &detector, OSystem *system) {
}
static void runGame(GameDetector &detector, OSystem *system) {
// Set the window caption to the game name
Common::String caption(ConfMan.get("description", detector._targetName));
@ -290,6 +289,7 @@ extern "C" int main(int argc, char *argv[]) {
extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) {
#endif
char *cfgFilename = NULL, *s=argv[1];
bool running = true;
#if defined(UNIX)
/* On Unix, do a quick endian / alignement check before starting */
@ -386,7 +386,7 @@ extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) {
// FIXME: We're now looping the launcher. This, of course, doesn't
// work as well as it should. In theory everything should be destroyed
// cleanly, so this is now enabled to encourage people to fix bits :)
while(1) {
while(running) {
// Verify the given game name is a valid supported game
if (detector.detectMain()) {
// Unload all plugins not needed for this game,
@ -402,9 +402,10 @@ extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) {
ConfMan.removeKey("save_slot", ConfMan.kTransientDomain);
// PluginManager::instance().unloadPlugins();
// PluginManager::instance().loadPlugins();
launcherDialog(detector, system);
PluginManager::instance().loadPlugins();
}
launcherDialog(detector, system);
}
// ...and quit (the return 0 should never be reached)

View File

@ -181,8 +181,8 @@ void MidiParser::onTimer() {
_position._last_event_tick += info.delta;
if (info.event < 0x80) {
warning("Bad command or running status %02X", info.event);
_position._play_pos = 0;
return;
//_position._play_pos = 0;
//return;
}
if (info.event == 0xF0) {

View File

@ -277,7 +277,9 @@ protected:
bool _autoLoop; //!< For lightweight clients that don't provide their own flow control.
bool _smartJump; //!< Support smart expiration of hanging notes when jumping
byte * _tracks[32]; //!< Multi-track MIDI formats are supported, up to 32 tracks.
// FIXME: ? Was 32 here, Kyra tracks use 120(!!!) which seems wrong. this is a hacky
// workaround until situation is investigated.
byte * _tracks[120]; //!< Multi-track MIDI formats are supported, up to 120 tracks.
byte _num_tracks; //!< Count of total tracks for multi-track MIDI formats. 1 for single-track formats.
byte _active_track; //!< Keeps track of the currently active track, in multi-track formats.