D3D11: Respect vsync setting.

Fixes #12493.
This commit is contained in:
Unknown W. Brackets 2020-02-29 22:47:08 -08:00
parent 2a3fd05651
commit 6f86b6fdbe
2 changed files with 3 additions and 2 deletions

View File

@ -42,12 +42,12 @@ D3D11Context::~D3D11Context() {
}
void D3D11Context::SwapBuffers() {
swapChain_->Present(0, 0);
swapChain_->Present(swapInterval_, 0);
draw_->HandleEvent(Draw::Event::PRESENTED, 0, 0, nullptr, nullptr);
}
void D3D11Context::SwapInterval(int interval) {
// Dummy
swapInterval_ = interval;
}
HRESULT D3D11Context::CreateTheDevice(IDXGIAdapter *adapter) {

View File

@ -67,4 +67,5 @@ private:
HMODULE hD3D11;
int width;
int height;
int swapInterval_ = 0;
};