Revert to a default audio api (SDL) when config is invalid
Prevents crash when an invalid or a non existing api is used in vbam.conf
This commit is contained in:
parent
0d1b23c5e8
commit
0c579b20a1
|
@ -254,10 +254,18 @@ opt_desc opts[] = {
|
||||||
INTOPT("preferences/vsync", "VSync", wxTRANSLATE("Wait for vertical sync"), vsync, 0, 1),
|
INTOPT("preferences/vsync", "VSync", wxTRANSLATE("Wait for vertical sync"), vsync, 0, 1),
|
||||||
|
|
||||||
/// Sound
|
/// Sound
|
||||||
#ifdef __WXMSW__
|
#ifdef NO_OAL
|
||||||
ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl|openal|directsound|xaudio2")),
|
#ifdef __WXMSW__
|
||||||
|
ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdldirectsound|xaudio2")),
|
||||||
|
#else
|
||||||
|
ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl")),
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl|openal|directsound|xaudio2")),
|
||||||
|
#else
|
||||||
ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl|openal")),
|
ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl|openal")),
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
INTOPT("Sound/Buffers", "", wxTRANSLATE("Number of sound buffers"), gopts.audio_buffers, 2, 10),
|
INTOPT("Sound/Buffers", "", wxTRANSLATE("Number of sound buffers"), gopts.audio_buffers, 2, 10),
|
||||||
INTOPT("Sound/Enable", "", wxTRANSLATE("Bit mask of sound channels to enable"), gopts.sound_en, 0, 0x30f),
|
INTOPT("Sound/Enable", "", wxTRANSLATE("Bit mask of sound channels to enable"), gopts.sound_en, 0, 0x30f),
|
||||||
|
|
Loading…
Reference in New Issue