Revert "Revert "Fix MIDI Soundfont code shadowing a global variable.""
This reverts commit 99dbcb9f65
.
This commit is contained in:
parent
384dc0674e
commit
015abfc970
|
@ -158,14 +158,14 @@ static void MidiSoundfontPath_Onchange(void)
|
||||||
|
|
||||||
if (stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string))
|
if (stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string))
|
||||||
{
|
{
|
||||||
char *token;
|
char *miditoken;
|
||||||
char *source = strdup(cv_midisoundfontpath.string);
|
char *source = strdup(cv_midisoundfontpath.string);
|
||||||
boolean proceed = true;
|
boolean proceed = true;
|
||||||
// check if file exists; menu calls this method at every keystroke
|
// check if file exists; menu calls this method at every keystroke
|
||||||
|
|
||||||
while ((token = strtok_r(source, ";", &source)))
|
while ((miditoken = strtok_r(source, ";", &source)))
|
||||||
{
|
{
|
||||||
SDL_RWops *rw = SDL_RWFromFile(token, "r");
|
SDL_RWops *rw = SDL_RWFromFile(miditoken, "r");
|
||||||
if (rw != NULL)
|
if (rw != NULL)
|
||||||
SDL_RWclose(rw);
|
SDL_RWclose(rw);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue