mirror of https://github.com/bkaradzic/bgfx
Cleanup.
This commit is contained in:
parent
d952e5cfb3
commit
448a42a8c6
21
src/dxgi.cpp
21
src/dxgi.cpp
|
@ -27,8 +27,8 @@ namespace WinUI3
|
|||
ISwapChainPanelNative : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSwapChain(
|
||||
/* [annotation][in] */
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSwapChain(
|
||||
/* [annotation][in] */
|
||||
_In_ IDXGISwapChain *swapChain) = 0;
|
||||
};
|
||||
|
||||
|
@ -37,8 +37,8 @@ namespace WinUI3
|
|||
ISwapChainBackgroundPanelNative : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSwapChain(
|
||||
/* [annotation][in] */
|
||||
virtual HRESULT STDMETHODCALLTYPE SetSwapChain(
|
||||
/* [annotation][in] */
|
||||
_In_ IDXGISwapChain *swapChain) = 0;
|
||||
};
|
||||
}
|
||||
|
@ -144,14 +144,14 @@ namespace bgfx
|
|||
{
|
||||
ISwapChainPanelNative* swapChainPanelNative = NULL;
|
||||
|
||||
if (NULL != nativeWindow && FAILED(nativeWindow->QueryInterface(__uuidof(T), (void**)&swapChainPanelNative))
|
||||
if (FAILED(nativeWindow->QueryInterface(__uuidof(T), (void**)&swapChainPanelNative) )
|
||||
|| NULL == swapChainPanelNative)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
*hr = swapChainPanelNative->SetSwapChain(swapChain);
|
||||
if (SUCCEEDED(*hr))
|
||||
if (SUCCEEDED(*hr) )
|
||||
{
|
||||
DX_RELEASE_I(swapChainPanelNative);
|
||||
}
|
||||
|
@ -167,6 +167,11 @@ namespace bgfx
|
|||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
if (NULL == nativeWindow)
|
||||
{
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (trySetSwapChain<ISwapChainPanelNative>(nativeWindow, swapChain, &hr)
|
||||
|| trySetSwapChain<ISwapChainBackgroundPanelNative>(nativeWindow, swapChain, &hr)
|
||||
|| trySetSwapChain<WinUI3::ISwapChainPanelNative>(nativeWindow, swapChain, &hr)
|
||||
|
@ -558,7 +563,7 @@ namespace bgfx
|
|||
# if BX_PLATFORM_WINRT
|
||||
IInspectable* nativeWindow = reinterpret_cast<IInspectable*>(_scd.nwh);
|
||||
hr = setSwapChain(nativeWindow, *_swapChain);
|
||||
if (FAILED(hr))
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
return hr;
|
||||
}
|
||||
|
@ -634,7 +639,7 @@ namespace bgfx
|
|||
IInspectable* nativeWindow = reinterpret_cast<IInspectable*>(_scd.nwh);
|
||||
return setSwapChain(nativeWindow, NULL);
|
||||
}
|
||||
#endif
|
||||
#endif // BX_PLATFORM_WINRT
|
||||
|
||||
void Dxgi::updateHdr10(SwapChainI* _swapChain, const SwapChainDesc& _scd)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue