Skip to content

Commit 6d36a33

Browse files
committed
Allow entering just the audio path and have it parse correctly.. not that this will be indicated anywhere
1 parent bb40a32 commit 6d36a33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gui.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
242242
GetWindowText(BinTextBox, binPath, sizeof(binPath));
243243
GetWindowText(AudioTextBox, audioPath, sizeof(audioPath));
244244
GetWindowText(EventsTextBox, eventsPath, sizeof(eventsPath));
245-
char* bnk_extract_args[] = {"", "-b", binPath, "-a", audioPath, "-e", eventsPath, "-vv", NULL};
246-
WemInformation* wemInformation = bnk_extract(ARRAYSIZE(bnk_extract_args)-1, bnk_extract_args);
245+
bool onlyAudioGiven = *audioPath && !*binPath && !*eventsPath;
246+
char** bnk_extract_args = onlyAudioGiven ? (char*[]) {"", "-a", audioPath, NULL} : (char*[]) {"", "-b", binPath, "-a", audioPath, "-e", eventsPath, NULL};
247+
WemInformation* wemInformation = bnk_extract(onlyAudioGiven ? 3 : 7, bnk_extract_args);
247248
if (wemInformation) {
248249
wemInformation->grouped_wems->wemData = (AudioData*) wemInformation->sortedWemDataList;
249250
InsertStringToTreeview(wemInformation->grouped_wems, TVI_ROOT);

0 commit comments

Comments
 (0)