mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
Add wgc demo
This commit is contained in:
17
export.cpp
Normal file
17
export.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "pch.h"
|
||||
|
||||
#include <winrt/Windows.Foundation.Metadata.h>
|
||||
|
||||
bool wgc_is_supported() {
|
||||
try {
|
||||
/* no contract for IGraphicsCaptureItemInterop, verify 10.0.18362.0 */
|
||||
return winrt::Windows::Foundation::Metadata::ApiInformation::
|
||||
IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 8);
|
||||
} catch (const winrt::hresult_error &) {
|
||||
return false;
|
||||
} catch (...) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
am::wgc_session *wgc_create_session() { return new am::wgc_session_impl(); }
|
||||
Reference in New Issue
Block a user