mirror of https://github.com/PCSX2/pcsx2.git
DEV9: Don't enforce MTA requirement
Also CoUninitialize() needs to be called for all successful calls to CoInitialize/Ex(), not just those that return S_OK
This commit is contained in:
parent
dc376ab161
commit
4eba400170
|
@ -417,7 +417,9 @@ bool TAPGetWin32Adapter(const std::string& name, PIP_ADAPTER_ADDRESSES adapter,
|
|||
|
||||
//Step 2
|
||||
//Init COM
|
||||
const HRESULT cohr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
||||
HRESULT cohr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
||||
if (cohr == RPC_E_CHANGED_MODE)
|
||||
cohr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
|
||||
if (!SUCCEEDED(cohr))
|
||||
return false;
|
||||
|
||||
|
@ -514,8 +516,7 @@ bool TAPGetWin32Adapter(const std::string& name, PIP_ADAPTER_ADDRESSES adapter,
|
|||
}
|
||||
}
|
||||
|
||||
if (cohr == S_OK)
|
||||
CoUninitialize();
|
||||
CoUninitialize();
|
||||
|
||||
if (bridgeAdapter != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue