mirror of
https://github.com/DarthAffe/ScreenCapture.NET.git
synced 2025-12-12 13:28:35 +00:00
19 lines
607 B
C#
19 lines
607 B
C#
using Vortice.DXGI;
|
|
|
|
namespace ScreenCapture.NET;
|
|
|
|
// DarthAffe 22.02.2023: These helper-methods where removed from Vortice and are readded here since they are used.
|
|
internal static class DX11CompatibilityExtensions
|
|
{
|
|
public static IDXGIAdapter1 GetAdapter1(this IDXGIFactory1 factory, int index)
|
|
{
|
|
factory.EnumAdapters1(index, out IDXGIAdapter1 adapter).CheckError();
|
|
return adapter;
|
|
}
|
|
|
|
public static IDXGIOutput GetOutput(this IDXGIAdapter1 adapter, int index)
|
|
{
|
|
adapter.EnumOutputs(index, out IDXGIOutput output).CheckError();
|
|
return output;
|
|
}
|
|
} |