Win64 fixes (cast to DWORD_PTR instead of DWORD). Patch by Ozkan Sezer.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 16 Feb 2010 15:30:47 +0000
changeset 485e2c905c12312
parent 484 a77df8583d18
child 486 6e823c27bfea
Win64 fixes (cast to DWORD_PTR instead of DWORD). Patch by Ozkan Sezer.

Fixes Bugzilla #951.
native_midi/native_midi_win32.c
     1.1 --- a/native_midi/native_midi_win32.c	Thu Feb 04 20:32:01 2010 +0000
     1.2 +++ b/native_midi/native_midi_win32.c	Tue Feb 16 15:30:47 2010 +0000
     1.3 @@ -266,10 +266,10 @@
     1.4    native_midi_stop();
     1.5    if (!hMidiStream)
     1.6    {
     1.7 -    merr=midiStreamOpen(&hMidiStream,&MidiDevice,1,(DWORD)&MidiProc,0,CALLBACK_FUNCTION);
     1.8 +    merr=midiStreamOpen(&hMidiStream,&MidiDevice,(DWORD)1,(DWORD_PTR)MidiProc,(DWORD_PTR)0,CALLBACK_FUNCTION);
     1.9      if (merr!=MMSYSERR_NOERROR)
    1.10      {
    1.11 -      hMidiStream=0;
    1.12 +      hMidiStream = NULL; // should I do midiStreamClose(hMidiStream) before?
    1.13        return;
    1.14      }
    1.15      //midiStreamStop(hMidiStream);
    1.16 @@ -291,7 +291,7 @@
    1.17    midiStreamStop(hMidiStream);
    1.18    midiStreamClose(hMidiStream);
    1.19    currentsong=NULL;
    1.20 -  hMidiStream = 0;
    1.21 +  hMidiStream = NULL;
    1.22  }
    1.23  
    1.24  int native_midi_active()