Skip to content

Commit

Permalink
Don't call GetForegroundWindow on UWP
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Aug 15, 2024
1 parent c488014 commit e8ed58e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions alc/backends/otherio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ auto PopulateDeviceList() -> HRESULT
auto hr = CoCreateInstance(guid, nullptr, CLSCTX_INPROC_SERVER, guid, al::out_ptr(iface));
if(SUCCEEDED(hr))
{
#ifndef ALSOFT_UWP
if(!iface->Init(GetForegroundWindow()))
#else
if(!iface->Init(nullptr))
#endif
{
ERR("Failed to initialize %s\n", subkeyname.c_str());
continue;
Expand Down

0 comments on commit e8ed58e

Please sign in to comment.