diff options
author | Jamieson Christian | 2002-12-12 01:35:57 +0000 |
---|---|---|
committer | Jamieson Christian | 2002-12-12 01:35:57 +0000 |
commit | 8f419dcaa897b4c26bfc2af1c55bb626d40c4269 (patch) | |
tree | f5312f9c47db85b38cf22f1556813b9cd2012786 /backends | |
parent | 89fa8addef599bd5c58804258f0e6933bfce516e (diff) | |
download | scummvm-rg350-8f419dcaa897b4c26bfc2af1c55bb626d40c4269.tar.gz scummvm-rg350-8f419dcaa897b4c26bfc2af1c55bb626d40c4269.tar.bz2 scummvm-rg350-8f419dcaa897b4c26bfc2af1c55bb626d40c4269.zip |
Fixed VC++ errors in Windows driver after streaming capability was removed.
svn-id: r5908
Diffstat (limited to 'backends')
-rw-r--r-- | backends/midi/windows.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index 10653eb928..bb2f33c050 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -31,35 +31,32 @@ //////////////////////////////////////// class MidiDriver_WIN : public MidiDriver_MPU401 { -public: - MidiDriver_WIN(); - int open(int mode); - void close(); - void send(uint32 b); - private: HMIDIOUT _mo; + bool _isOpen; void check_error(MMRESULT result); - uint32 property(int prop, uint32 param); -}; + uint32 property(int prop, uint32 param) { return 0; } -MidiDriver_WIN::MidiDriver_WIN() -{ - _isOpen = false; -} +public: + MidiDriver_WIN() : _isOpen (false) { } + int open(); + void close(); + void send(uint32 b); +}; int MidiDriver_WIN::open() { if (_isOpen) return MERR_ALREADY_OPEN; - _isOpen = true; - MMRESULT res = midiOutOpen((HMIDIOUT *) &_mo, MIDI_MAPPER, 0, 0, 0); - if (res != MMSYSERR_NOERROR) + if (res != MMSYSERR_NOERROR) { check_error(res); + return MERR_DEVICE_NOT_AVAILABLE; + } + _isOpen = true; return 0; } |