@@ -358,24 +358,8 @@ uchar fv;
358358// override get_temp_string() to support hard-coded custom strings without
359359// providing an actual resource file
360360
361- #define REF_STR_Renderer 0x10000000
362- #define REF_STR_Software 0x10000001
363- #define REF_STR_OpenGL 0x10000002
364-
365- #define REF_STR_MousLook 0x11000000
366- #define REF_STR_MousNorm 0x11000001
367- #define REF_STR_MousInv 0x11000002
368-
369- #define REF_STR_Seqer 0x20000000
370- #define REF_STR_ADLMIDI 0x20000001
371- #define REF_STR_NativeMI 0x20000002
372- #define REF_STR_FluidSyn 0x20000003 // this has to be last because it is optional
373- #define REF_STR_MidiOut 0x2fffffff
374-
375- #define REF_STR_MidiOutX 0x30000000 // 0x30000000-0x3fffffff are MIDI outputs
376-
377- #define MIDI_OUT_BUFFER_SIZE 1024
378- static char MIDI_OUT_BUFFER [MIDI_OUT_BUFFER_SIZE ];
361+ #define MIDI_OUT_STR_SIZE 1024
362+ static char MIDI_STR_BUFFER [MIDI_OUT_STR_SIZE ];
379363
380364static char * _get_temp_string (int num ) {
381365 switch (num ) {
@@ -390,17 +374,19 @@ static char *_get_temp_string(int num) {
390374 case REF_STR_Seqer : return "Midi Player" ;
391375 case REF_STR_ADLMIDI : return "ADLMIDI" ;
392376 case REF_STR_NativeMI : return "Native MIDI" ;
377+ #ifdef USE_FLUIDSYNTH
393378 case REF_STR_FluidSyn : return "FluidSynth" ;
379+ #endif
394380
395381 case REF_STR_MidiOut : return "Midi Output" ;
396382 }
397383
398384 if (num >= REF_STR_MidiOutX && num <= (REF_STR_MidiOutX | 0x0fffffff ))
399385 {
400386 const unsigned int midiOutputIndex = (unsigned int )num - REF_STR_MidiOutX ;
401- MIDI_OUT_BUFFER [0 ] = '\0' ;
402- GetOutputNameXMI (midiOutputIndex , & MIDI_OUT_BUFFER [0 ], MIDI_OUT_BUFFER_SIZE );
403- return & MIDI_OUT_BUFFER [0 ];
387+ MIDI_STR_BUFFER [0 ] = '\0' ;
388+ GetOutputNameXMI (midiOutputIndex , & MIDI_STR_BUFFER [0 ], MIDI_OUT_STR_SIZE );
389+ return & MIDI_STR_BUFFER [0 ];
404390 }
405391
406392 return get_temp_string (num );
@@ -1492,14 +1478,9 @@ void soundopt_screen_init() {
14921478 i ++ ;
14931479#endif
14941480
1495- #ifdef USE_FLUIDSYNTH
1496- const uchar numSynths = 3 ;
1497- #else
1498- const uchar numSynths = 2 ;
1499- #endif
15001481 standard_button_rect (& r , i , 2 , 2 , 5 );
15011482 multi_init (i , 'p' , REF_STR_Seqer , REF_STR_ADLMIDI , ID_NULL ,
1502- sizeof (gShockPrefs .soMidiBackend ), & gShockPrefs .soMidiBackend , numSynths , seqer_dealfunc , & r );
1483+ sizeof (gShockPrefs .soMidiBackend ), & gShockPrefs .soMidiBackend , OPT_SEQ_Max , seqer_dealfunc , & r );
15031484 i ++ ;
15041485/* standard button is too narrow, so use a slider instead
15051486 const unsigned int numMidiOutputs = GetOutputCountXMI();
0 commit comments