Remove dependency on a library for a single function

This commit is contained in:
loki
2020-02-01 10:25:37 +01:00
parent c71d2739b1
commit 753f57c71b
7 changed files with 31 additions and 5 deletions

View File

@@ -17,6 +17,5 @@ set_target_properties(audio-info PROPERTIES CXX_STANDARD 17)
target_link_libraries(audio-info
${CMAKE_THREAD_LIBS_INIT}
ksuser
windowsapp
${PLATFORM_LIBRARIES})
target_compile_options(audio-info PRIVATE ${SUNSHINE_COMPILE_OPTIONS})

View File

@@ -172,6 +172,12 @@ void print_help() {
}
int main(int argc, char *argv[]) {
CoInitializeEx(nullptr, COINIT_MULTITHREADED | COINIT_SPEED_OVER_MEMORY);
auto fg = util::fail_guard([]() {
CoUninitialize();
});
if(argc > 1) {
device_state_filter = 0;
}
@@ -205,8 +211,6 @@ int main(int argc, char *argv[]) {
}
}
Windows::Foundation::Initialize(RO_INIT_MULTITHREADED);
HRESULT status;
audio::device_enum_t::pointer device_enum_p{};