Opened 22 years ago

Closed 22 years ago

Last modified 6 years ago

#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)

simon.diff (3.1 KB ) - added by eriktorbjorn 22 years ago.
Patch against an October 8 CVS snapshot

Download all attachments as: .zip

Change History (6)

by eriktorbjorn, 22 years ago

Attachment: simon.diff added

Patch against an October 8 CVS snapshot

comment:1 by fingolfin, 22 years ago

Owner: set to fingolfin
Status: newclosed

comment:2 by fingolfin, 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 eriktorbjorn, 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:4 by eriktorbjorn, 22 years ago

It works. Thanks!

comment:5 by digitall, 6 years ago

Component: Engine: AGOS
Game: Simon the Sorcerer 1
Note: See TracTickets for help on using tickets.