mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 17:19:18 +01:00
XAudio2: Don't quit on failed CoInitializeEx()
It returns an error code when already initialized
This commit is contained in:
parent
f42bebd196
commit
d251ce07e0
@ -187,7 +187,8 @@ const std::vector<XAudio2API::DeviceDescriptionPtr>& XAudio2API::RefreshDevices(
|
||||
// this function must be called from the same thread as we called CoInitializeEx
|
||||
s_devices.clear();
|
||||
|
||||
if (FAILED(CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE)))
|
||||
HRESULT r = CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
if (r != RPC_E_CHANGED_MODE && FAILED(r))
|
||||
return s_devices;
|
||||
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user