From 4705c3e59ae7ccf33329ec181a07c87f2cacf919 Mon Sep 17 00:00:00 2001 From: "Jules.A" Date: Thu, 1 Nov 2018 21:47:15 +0800 Subject: [PATCH] Whoops, fix deviceCount. --- desmume/src/frontend/windows/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/desmume/src/frontend/windows/main.cpp b/desmume/src/frontend/windows/main.cpp index 947083e9d..611af2547 100755 --- a/desmume/src/frontend/windows/main.cpp +++ b/desmume/src/frontend/windows/main.cpp @@ -6209,6 +6209,7 @@ LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { + const bool isPCapSupported = wifiHandler->IsPCapSupported(); const WifiEmulationLevel emulationLevel = wifiHandler->GetSelectedEmulationLevel(); switch(uMsg) @@ -6242,7 +6243,12 @@ LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM { ComboBox_DeleteString(deviceMenu, 0); } - + + if (isPCapSupported) + { + deviceCount = wifiHandler->GetBridgeDeviceList(&deviceStringList); + } + if (deviceCount < 0) { ComboBox_AddString(deviceMenu, "Error: Cannot find any devices.");