Combine the separate HDR and SDR capture formats

Since we support multi-encoding from a single display context, we have
to ensure our capture format allows for HDR color even if the initial
encoding session is SDR.
This commit is contained in:
Cameron Gutman
2023-04-04 22:19:02 -05:00
parent 290c9b3e20
commit f04d5e12de
4 changed files with 6 additions and 23 deletions

View File

@@ -517,7 +517,7 @@ namespace platf::dxgi {
status = output->QueryInterface(IID_IDXGIOutput5, (void **) &output5);
if (SUCCEEDED(status)) {
// Ask the display implementation which formats it supports
auto supported_formats = config.dynamicRange ? get_supported_hdr_capture_formats() : get_supported_sdr_capture_formats();
auto supported_formats = get_supported_capture_formats();
if (supported_formats.empty()) {
BOOST_LOG(warning) << "No compatible capture formats for this encoder"sv;
return -1;