diff --git a/src/backends/windows.cpp b/src/backends/windows.cpp index 8b8e3f5..e249c00 100644 --- a/src/backends/windows.cpp +++ b/src/backends/windows.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -94,7 +95,7 @@ std::shared_ptr backend::getMediaInformation() { std::vector buffer(size); reader.ReadBytes(buffer); reader.Close(); - + thumbnailData = std::string(buffer.begin(), buffer.end()); stream.Close(); } @@ -117,7 +118,10 @@ std::shared_ptr backend::getMediaInformation() { thumbnailData, endTime, elapsedTime); } -bool backend::init() { return true; } +bool backend::init() { + return winrt::Windows::Foundation::Metadata::ApiInformation::IsTypePresent( + L"Windows.Media.Control.GlobalSystemMediaTransportControlsSessionManager"); +} #undef EM_DASH #endif \ No newline at end of file