Skip to content
Permalink
Browse files

Fixed bug #809

 O.Sezer      2009-09-26 04:38:45 PDT

the filename argument of native_midi_loadsong() should be const char*, the attached patch does that and also removes the unnecessary char* cast in music.c where native_midi_loadsong() is called.
  • Loading branch information
slouken committed Sep 26, 2009
1 parent 079e34d commit a93f52fa005c0d1b8ef7c787ed7554d9276f6359
@@ -627,7 +627,7 @@ Mix_Music *Mix_LoadMUS(const char *file)
music->type = MUS_MID;
#ifdef USE_NATIVE_MIDI
if ( native_midi_ok ) {
music->data.nativemidi = native_midi_loadsong((char *)file);
music->data.nativemidi = native_midi_loadsong(file);
if ( music->data.nativemidi == NULL ) {
Mix_SetError("%s", native_midi_error());
music->error = 1;
@@ -28,7 +28,7 @@
typedef struct _NativeMidiSong NativeMidiSong;

int native_midi_detect();
NativeMidiSong *native_midi_loadsong(char *midifile);
NativeMidiSong *native_midi_loadsong(const char *midifile);
NativeMidiSong *native_midi_loadsong_RW(SDL_RWops *rw);
void native_midi_freesong(NativeMidiSong *song);
void native_midi_start(NativeMidiSong *song);
@@ -89,7 +89,7 @@ int native_midi_detect()
return 1;
}

NativeMidiSong *native_midi_loadsong(char *midifile)
NativeMidiSong *native_midi_loadsong(const char *midifile)
{
NativeMidiSong *song = NULL;
MIDIEvent *evntlist = NULL;
@@ -188,7 +188,7 @@ int native_midi_detect()
return 1;
}

NativeMidiSong *native_midi_loadsong(char *midifile)
NativeMidiSong *native_midi_loadsong(const char *midifile)
{
NativeMidiSong *newsong;
MIDIEvent *evntlist = NULL;
@@ -127,7 +127,7 @@ int native_midi_detect()
return ret;
}

NativeMidiSong *native_midi_loadsong(char *midifile)
NativeMidiSong *native_midi_loadsong(const char *midifile)
{
NativeMidiSong *song = NULL;
char *extra;

0 comments on commit a93f52f

Please sign in to comment.