Age | Commit message (Collapse) | Author |
|
At Raziel^'s request. This is the same as the ALSA checks I added
earlier today.
|
|
This should make it easier to spot errors like the one spotted in
the Queen engine yesterday. The Windows MIDI driver already seems
to do something like this; I don't know about the others.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some backends may break as I only compiled SDL
|
|
Found by GCC 4.6's -Wunused-but-set-variable
|
|
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.
The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom
Also fixed some engines which were leaking MidiDriver instances.
|
|
|
|
Thanks to waltervn (and wjp) for their investigation on this and Walter's SCI
specific workaround which I more or less just copied here so it will apply for
all engines.
|
|
This might fix odd problems when storing the device name in the config file,
when the name ends with a space by chance.
|
|
svn-id: r55857
|
|
svn-id: r55851
|
|
svn-id: r55850
|
|
svn-id: r55248
|
|
svn-id: r54584
|
|
svn-id: r54575
|
|
svn-id: r54573
|
|
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.
If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.
Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.
svn-id: r53961
|
|
svn-id: r53395
|
|
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.
svn-id: r52791
|
|
Often, a client has more than one available port. Pick the first one
that isn't already in use. For instance, on my computer client 17 is
the "Emu10k1 WaveTable", and it has four available ports. If, say,
aplaymidi is already playing on port 17:0, ScummVM will use port 17:1
instead. Otherwise the two programs will mess up each others
instruments and controller settings.
Of course, in reality I doubt that anyone will run two different MIDI
playing applications at once.
svn-id: r51380
|
|
This keeps ScummVM's own port from being included in the list of
available MIDI devices.
svn-id: r51378
|
|
Thanks to eriktorbjorn for some quick testing.
svn-id: r51366
|
|
An #include was missing, causing the driver to never be built. Also fixed what
looked like a cut-and-paste error in generating the features string.
svn-id: r51056
|
|
* Added a yes/no variable _unix to configure, which controls when
-DUNIX is added to DEFINES
* Enable SEQ MIDI via _seq_midi by default on UNIX type systems,
except for those which override that.
* Switch SEQ MIDI code to check #define USE_SEQ_MIDI
(alternatively, we could compile it only conditionally...)
svn-id: r51055
|
|
svn-id: r51053
|
|
This is also an attempt to make the transition from the old settings to the
new ones a little less rough, by trying to put something sensible into the
first device, which is what's used by default. Currently it prefers 17:x
and 65:x since they're the old defaults, followed by 128:x since that's
probably TiMidity.
The old SCUMMVM_PORT environment variable still overrides any config
settings. I haven't made up my mind whether or not that's a good idea, but
at least it prints a warning message.
TODO: The old 'alsa_port' setting is not handled. It should probably be
used to set sensible defaults for the new settings, but I'm not sure where
this should be done.
TODO: The documentation will need to be updated, once everything is working
the way it should.
svn-id: r51019
|
|
We should probably open the sequencer the exact same way, both when
opening the driver and when asking it for available MIDI devices. Not
that I've been able to figure out the difference between "hw" and
"default" from the fine ALSA manual...
And I'm not sure we really need to try and keep compatibility with
ancient (pre-0.9.0?) ALSA any longer...
svn-id: r51014
|
|
svn-id: r50964
|
|
ScummVM from crashing if, for instance, someone accidentally closes the driver
twice.
svn-id: r50870
|
|
svn-id: r50664
|
|
This will cause our code to include less functionality, but might on the other hand fasten up the compilation.
svn-id: r50346
|
|
svn-id: r50324
|
|
svn-id: r50128
|
|
svn-id: r48955
|
|
svn-id: r48277
|
|
svn-id: r47449
|
|
before freeing it, which isn't necessary.
svn-id: r46941
|
|
svn-id: r46315
|
|
not as good as the CoreAudio backend anyway
svn-id: r44428
|
|
svn-id: r44427
|
|
svn-id: r43974
|
|
svn-id: r42104
|
|
with -DFORTIFY_SOURCE=2 -fstack-protector)
svn-id: r41930
|
|
look at debug() and debugC(), since I'm really bored with this now. :-)
svn-id: r41061
|
|
svn-id: r41037
|