From 964f086bea1be7a06a88bc7142687e57dd2dedc9 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Tue, 1 Jan 2019 18:44:51 -0800 Subject: [PATCH] fix audioapi opt enum, reorder xrc The config option name enum needs to match the actual enum, since the value is an integer. Unavailable APIs are not shown using #ifdefs in guiinit.cpp. Also reorder the radio button xrcs to be in the order of the enum. --- src/wx/faudio.cpp | 3 +++ src/wx/opts.cpp | 24 +----------------------- src/wx/xrc/SoundConfig.xrc | 18 +++++++++++------- 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/src/wx/faudio.cpp b/src/wx/faudio.cpp index bc4b92e58..268d3d4a2 100644 --- a/src/wx/faudio.cpp +++ b/src/wx/faudio.cpp @@ -25,6 +25,9 @@ int GetFADevices(FAudio* fa, wxArrayString* names, wxArrayString* ids, { HRESULT hr; UINT32 dev_count = 0; + + wxLogDebug("IN FAUDIO INIT"); + hr = FAudio_GetDeviceCount(fa, &dev_count); if (hr != S_OK) { diff --git a/src/wx/opts.cpp b/src/wx/opts.cpp index 079b18fbe..20f59c17f 100644 --- a/src/wx/opts.cpp +++ b/src/wx/opts.cpp @@ -255,29 +255,7 @@ opt_desc opts[] = { /// Sound -#define OAL_SOUND "openal|" - -#ifdef NO_OAL -# define OAL_SOUND "" -#endif - -#define XAUDIO2_SOUND "xaudio2|" - -#ifdef NO_XAUDIO2 -# define XAUDIO2_SOUND "" -#endif - -#define FAUDIO_SOUND "faudio|" - -#ifdef NO_FAUDIO -# define FAUDIO_SOUND "" -#endif - -#ifdef __WXMSW__ - ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl|" OAL_SOUND "directsound|" FAUDIO_SOUND "xaudio2")), -#else - ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl|" OAL_SOUND FAUDIO_SOUND)), -#endif + ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl|openal|directsound|xaudio2|faudio")), 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/GBAFiltering", "", wxTRANSLATE("GBA sound filtering (%)"), gopts.gba_sound_filter, 0, 100), diff --git a/src/wx/xrc/SoundConfig.xrc b/src/wx/xrc/SoundConfig.xrc index 3f1feca20..77c220a26 100644 --- a/src/wx/xrc/SoundConfig.xrc +++ b/src/wx/xrc/SoundConfig.xrc @@ -109,13 +109,23 @@ + wxALL|wxEXPAND 5 + + + + + + wxALL + 5 + + wxALL|wxEXPAND 5 @@ -123,17 +133,11 @@ + wxALL|wxEXPAND 5 - - - - - wxALL - 5 - wxHORIZONTAL wxEXPAND