Ver Fonte

libobs-winrt: Use better Windows SDK version check

Latest Windows SDK has a macro for borderless window capture support.
jpark37 há 4 anos atrás
pai
commit
4002995b86
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      libobs-winrt/winrt-capture.cpp

+ 3 - 3
libobs-winrt/winrt-capture.cpp

@@ -262,7 +262,7 @@ static void winrt_capture_device_loss_release(void *data)
 	capture->item = nullptr;
 	capture->item = nullptr;
 }
 }
 
 
-#ifdef NTDDI_WIN10_FE
+#if WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION >= 0xc0000
 static bool winrt_capture_border_toggle_supported()
 static bool winrt_capture_border_toggle_supported()
 try {
 try {
 	return winrt::Windows::Foundation::Metadata::ApiInformation::
 	return winrt::Windows::Foundation::Metadata::ApiInformation::
@@ -362,7 +362,7 @@ static void winrt_capture_device_loss_rebuild(void *device_void, void *data)
 	const winrt::Windows::Graphics::Capture::GraphicsCaptureSession session =
 	const winrt::Windows::Graphics::Capture::GraphicsCaptureSession session =
 		frame_pool.CreateCaptureSession(item);
 		frame_pool.CreateCaptureSession(item);
 
 
-#ifdef NTDDI_WIN10_FE
+#if WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION >= 0xc0000
 	if (winrt_capture_border_toggle_supported()) {
 	if (winrt_capture_border_toggle_supported()) {
 		winrt::Windows::Graphics::Capture::GraphicsCaptureAccess::
 		winrt::Windows::Graphics::Capture::GraphicsCaptureAccess::
 			RequestAccessAsync(
 			RequestAccessAsync(
@@ -443,7 +443,7 @@ try {
 	const winrt::Windows::Graphics::Capture::GraphicsCaptureSession session =
 	const winrt::Windows::Graphics::Capture::GraphicsCaptureSession session =
 		frame_pool.CreateCaptureSession(item);
 		frame_pool.CreateCaptureSession(item);
 
 
-#ifdef NTDDI_WIN10_FE
+#if WINDOWS_FOUNDATION_UNIVERSALAPICONTRACT_VERSION >= 0xc0000
 	if (winrt_capture_border_toggle_supported()) {
 	if (winrt_capture_border_toggle_supported()) {
 		winrt::Windows::Graphics::Capture::GraphicsCaptureAccess::
 		winrt::Windows::Graphics::Capture::GraphicsCaptureAccess::
 			RequestAccessAsync(
 			RequestAccessAsync(