libobs-winrt: Require Windows 10 SDK 19041
This will prevent compiling without WGC cursor toggle support.master
parent
699ce4d294
commit
0d1f334591
|
@ -30,14 +30,10 @@ try {
|
||||||
|
|
||||||
extern "C" EXPORT BOOL winrt_capture_cursor_toggle_supported()
|
extern "C" EXPORT BOOL winrt_capture_cursor_toggle_supported()
|
||||||
try {
|
try {
|
||||||
#ifdef NTDDI_WIN10_VB
|
|
||||||
return winrt::Windows::Foundation::Metadata::ApiInformation::
|
return winrt::Windows::Foundation::Metadata::ApiInformation::
|
||||||
IsPropertyPresent(
|
IsPropertyPresent(
|
||||||
L"Windows.Graphics.Capture.GraphicsCaptureSession",
|
L"Windows.Graphics.Capture.GraphicsCaptureSession",
|
||||||
L"IsCursorCaptureEnabled");
|
L"IsCursorCaptureEnabled");
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
} catch (const winrt::hresult_error &err) {
|
} catch (const winrt::hresult_error &err) {
|
||||||
blog(LOG_ERROR, "winrt_capture_cursor_toggle_supported (0x%08X): %ls",
|
blog(LOG_ERROR, "winrt_capture_cursor_toggle_supported (0x%08X): %ls",
|
||||||
err.to_abi(), err.message().c_str());
|
err.to_abi(), err.message().c_str());
|
||||||
|
@ -345,10 +341,8 @@ static void winrt_capture_device_loss_rebuild(void *device_void, void *data)
|
||||||
frame_pool.CreateCaptureSession(item);
|
frame_pool.CreateCaptureSession(item);
|
||||||
|
|
||||||
/* disable cursor capture if possible since ours performs better */
|
/* disable cursor capture if possible since ours performs better */
|
||||||
#ifdef NTDDI_WIN10_VB
|
|
||||||
if (winrt_capture_cursor_toggle_supported())
|
if (winrt_capture_cursor_toggle_supported())
|
||||||
session.IsCursorCaptureEnabled(false);
|
session.IsCursorCaptureEnabled(false);
|
||||||
#endif
|
|
||||||
|
|
||||||
capture->item = item;
|
capture->item = item;
|
||||||
capture->device = device;
|
capture->device = device;
|
||||||
|
@ -420,10 +414,8 @@ try {
|
||||||
/* disable cursor capture if possible since ours performs better */
|
/* disable cursor capture if possible since ours performs better */
|
||||||
const BOOL cursor_toggle_supported =
|
const BOOL cursor_toggle_supported =
|
||||||
winrt_capture_cursor_toggle_supported();
|
winrt_capture_cursor_toggle_supported();
|
||||||
#ifdef NTDDI_WIN10_VB
|
|
||||||
if (cursor_toggle_supported)
|
if (cursor_toggle_supported)
|
||||||
session.IsCursorCaptureEnabled(false);
|
session.IsCursorCaptureEnabled(false);
|
||||||
#endif
|
|
||||||
|
|
||||||
struct winrt_capture *capture = new winrt_capture{};
|
struct winrt_capture *capture = new winrt_capture{};
|
||||||
capture->window = window;
|
capture->window = window;
|
||||||
|
|
Loading…
Reference in New Issue