diff --git a/src/libui_sdl/DlgAudioSettings.cpp b/src/libui_sdl/DlgAudioSettings.cpp index 7fbf1018..73096d5e 100644 --- a/src/libui_sdl/DlgAudioSettings.cpp +++ b/src/libui_sdl/DlgAudioSettings.cpp @@ -45,6 +45,18 @@ int OnCloseWindow(uiWindow* window, void* blarg) return 1; } +void OnMicWavBrowse(uiButton* btn, void* blarg) +{ + char* file = uiOpenFile(win, "WAV file (*.wav)|*.wav|Any file|*.*", NULL); + if (!file) + { + return; + } + + uiEntrySetText(txMicWavPath, file); + uiFreeText(file); +} + void OnCancel(uiButton* btn, void* blarg) { uiControlDestroy(uiControl(win)); @@ -120,6 +132,7 @@ void Open() uiBoxAppend(path_box, uiControl(txMicWavPath), 1); uiButton* path_browse = uiNewButton("..."); + uiButtonOnClicked(path_browse, OnMicWavBrowse, NULL); uiBoxAppend(path_box, uiControl(path_browse), 0); }