Skip to content

Commit

Permalink
D3D11: Respect vsync setting.
Browse files Browse the repository at this point in the history
Fixes #12493.
  • Loading branch information
unknownbrackets committed Mar 1, 2020
1 parent 2a3fd05 commit 6f86b6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Windows/GPU/D3D11Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions Windows/GPU/D3D11Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ class D3D11Context : public WindowsGraphicsContext {
HMODULE hD3D11;
int width;
int height;
int swapInterval_ = 0;
};

0 comments on commit 6f86b6f

Please sign in to comment.