check if on compatible windows version

This commit is contained in:
EinTim23 2024-11-06 11:36:32 +01:00
parent 1be868acaf
commit 45bacb0108
1 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,7 @@
#include <shlobj.h>
#include <windows.h>
#include <winrt/windows.foundation.h>
#include <winrt/windows.foundation.metadata.h>
#include <winrt/windows.media.control.h>
#include <winrt/windows.storage.streams.h>
@ -117,7 +118,10 @@ std::shared_ptr<MediaInfo> 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