libobs-winrt,win-capture: Add Force SDR for WGC display

Leverage existing window capture support for display capture.
This commit is contained in:
jpark37 2022-12-28 14:22:24 -08:00 • committed by Jim
commit 22ea8f4e1f
3 changed files with 18 additions and 7 deletions

View file

@ -546,9 +546,10 @@ winrt_capture_init_window(BOOL cursor, HWND window, BOOL client_area,
}
extern "C" EXPORT struct winrt_capture *
winrt_capture_init_monitor(BOOL cursor, HMONITOR monitor)
winrt_capture_init_monitor(BOOL cursor, HMONITOR monitor, BOOL force_sdr)
{
return winrt_capture_init_internal(cursor, NULL, false, false, monitor);
return winrt_capture_init_internal(cursor, NULL, false, force_sdr,
monitor);
}
extern "C" EXPORT void winrt_capture_free(struct winrt_capture *capture)

View file

@ -14,8 +14,8 @@ EXPORT BOOL winrt_capture_cursor_toggle_supported();
EXPORT struct winrt_capture *winrt_capture_init_window(BOOL cursor, HWND window,
BOOL client_area,
BOOL force_sdr);
EXPORT struct winrt_capture *winrt_capture_init_monitor(BOOL cursor,
HMONITOR monitor);
EXPORT struct winrt_capture *
winrt_capture_init_monitor(BOOL cursor, HMONITOR monitor, BOOL force_sdr);
EXPORT void winrt_capture_free(struct winrt_capture *capture);
EXPORT BOOL winrt_capture_active(const struct winrt_capture *capture);