Skip to content

Commit

Permalink
skip GammaRamp calls on win7
Browse files Browse the repository at this point in the history
  • Loading branch information
megai2 committed Sep 7, 2019
1 parent b5edeed commit 4a90080
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion d912pxy/d912pxy_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ d912pxy_swapchain::d912pxy_swapchain(int index, D3DPRESENT_PARAMETERS * in_pp) :
backBufferSurface = NULL;
swapCheckValue = D3D_OK;
dxgiNoWaitFlag = DXGI_PRESENT_DO_NOT_WAIT;
dxgiOWndProc = NULL;
dxgiOWndProc = NULL;
errorCount = 0;


if (index == 0)
{
baseSwapChain = this;
Expand Down Expand Up @@ -252,6 +253,9 @@ void d912pxy_swapchain::SetGammaRamp(DWORD Flags, CONST D3DGAMMARAMP* pRamp)
ComPtr<IDXGISwapChain4> d12sw = dxgiSwapchain;
ComPtr<IDXGIOutput> odata;

if (!d12sw)
return;

if (FAILED(d12sw->GetContainingOutput(&odata)))
return;

Expand Down Expand Up @@ -315,6 +319,9 @@ void d912pxy_swapchain::GetGammaRamp(D3DGAMMARAMP* pRamp)
ComPtr<IDXGISwapChain4> d12sw = dxgiSwapchain;
ComPtr<IDXGIOutput> odata;

if (!d12sw)
return;

if (FAILED(d12sw->GetContainingOutput(&odata)))
return;

Expand Down

0 comments on commit 4a90080

Please sign in to comment.