#8084 closed patch
Regression fix: Simon crashes on start
Reported by: | eriktorbjorn | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Engine: AGOS |
Version: | Keywords: | ||
Cc: | Game: | Simon the Sorcerer 1 |
Description
At least under UNIX the Simon games crashes on start-up because GameDetector::createMidi() returns NULL.
I don't know enough about Simon to fix it properly (e.g. by adding a MIDI -> AdLib converter or implementing streaming - whatever that is - for the MIDI drivers that don't have it), so what I do instead is to return MidiDriver_NULL_create(), if it's a Simon game and it would have otherwise returned NULL.
The patch also changes error() slightly so that the Simon games can use it without crashing. The problem here was that g_scumm was NULL, so it couldn't call g_scumm->_system->quit(). I've changed it to use g_system->quit() instead, even though g_system is labelled as a "BIG HACK"
Ticket imported from: #620625. Ticket imported from: patches/189.
Attachments (1)
Change History (6)
by , 22 years ago
Attachment: | simon.diff added |
---|
comment:1 by , 22 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:2 by , 22 years ago
I didn't use the patch but fixed the problem in a slightly different manner (I hope). Please correct me if I missed something.
comment:3 by , 22 years ago
Looks reasonable, and much simpler than my version, except the test for when it should create a "null" MIDI driver looks inverted. Surely it should be if (!driver), not if (driver)?
I'll try it when I get back home.
comment:5 by , 6 years ago
Component: | → Engine: AGOS |
---|---|
Game: | → Simon the Sorcerer 1 |
Patch against an October 8 CVS snapshot