diff options
| author | Rafaël Kooi <48814281+RA-Kooi@users.noreply.github.com> | 2021-12-27 14:06:23 +0100 |
|---|---|---|
| committer | Rafaël Kooi <48814281+RA-Kooi@users.noreply.github.com> | 2021-12-27 22:03:00 +0100 |
| commit | edb843415db2bfaae72bea45d413c90bd839b1fc (patch) | |
| tree | 7237e85d23ac723dad30737f616cfab83f39d6c0 | |
| parent | 8d237eb1020dd57d7521f1ea5af16045e7991bf4 (diff) | |
BBA: Fix TAP detection
| -rw-r--r-- | Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp b/Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp index 57e2418b87..1f3b9fcbcd 100644 --- a/Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp +++ b/Source/Core/Core/HW/EXI/BBA/TAP_Win32.cpp @@ -66,11 +66,16 @@ bool IsTAPDevice(const TCHAR* guid) if (status == ERROR_SUCCESS && data_type == REG_SZ) { - if (!_tcscmp(component_id, TAP_COMPONENT_ID) && !_tcscmp(net_cfg_instance_id, guid)) + TCHAR* const component_id_sub = _tcsstr(component_id, TAP_COMPONENT_ID); + + if (component_id_sub) { - RegCloseKey(unit_key); - RegCloseKey(netcard_key); - return true; + if (!_tcscmp(component_id_sub, TAP_COMPONENT_ID) && !_tcscmp(net_cfg_instance_id, guid)) + { + RegCloseKey(unit_key); + RegCloseKey(netcard_key); + return true; + } } } } |
