mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/graphicsdriver/directx: initialize the refresh rate explicitly for Windows 7
This is an experimental fix inspired by Chromium/ANGLE https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp;l=491-492;drc=79aa846e38739138918891e8b334fac464dd9b83 Updates #2613
This commit is contained in:
parent
09250ff4f3
commit
a4bfe8a869
@ -278,6 +278,8 @@ func (g *graphicsInfra) initSwapChain(width, height int, device unsafe.Pointer,
|
||||
if !isWindows10OrGreaterWin32() {
|
||||
desc.SwapEffect = _DXGI_SWAP_EFFECT_SEQUENTIAL
|
||||
desc.BufferCount = 1
|
||||
desc.BufferDesc.RefreshRate.Numerator = 0
|
||||
desc.BufferDesc.RefreshRate.Denominator = 1
|
||||
}
|
||||
|
||||
g.bufferCount = int(desc.BufferCount)
|
||||
|
Loading…
Reference in New Issue
Block a user