| 196 | |
| 197 | template <abi_t ABI> HRESULT DXGISwapChain1<ABI>::GetCoreWindow(REFIID refiid, void **ppUnk) |
| 198 | { |
| 199 | IMPLEMENT_STUB(); |
| 200 | return E_NOTIMPL; |
| 201 | } |
| 202 | |
| 203 | template <abi_t ABI> |
| 204 | HRESULT DXGISwapChain1<ABI>::Present1(uint32_t SyncInterval, uint32_t PresentFlags, |
| 205 | DXGI_PRESENT_PARAMETERS const *pPresentParameters) |
| 206 | { |
| 207 | static FPSLimiter Limiter(60.0); |
| 208 | Limiter.BeginFrame(); |
| 209 | |
| 210 | if (!m_wasIMGUIinitialized) |
| 211 | { |
| 212 | ID3D11Device* pDevice = nullptr; |
| 213 | ID3D11DeviceContext* pContext = nullptr; |
| 214 | m_pFunction->GetDevice(IID_PPV_ARGS(&pDevice)); |
| 215 | pDevice->GetImmediateContext(&pContext); |
| 216 | |
| 217 | p_wd->gui.Initialize(pDevice, pContext, m_pFunction); |
| 218 | m_wasIMGUIinitialized = true; |
| 219 | } |
| 220 | |
| 221 | p_wd->gui.Render(); |
| 222 | |
| 223 | Limiter.Wait(); |
| 224 | |
| 225 | if (!pPresentParameters) |
| 226 | return m_pFunction->Present(SyncInterval, PresentFlags); |
nothing calls this directly
no test coverage detected