1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 14:52:10 +01:00

[d3d8] Ignore unsupported D3DPRESENT_RATE_UNLIMITED

This commit is contained in:
WinterSnowfall 2024-09-08 18:52:07 +03:00 committed by Philip Rebohle
parent 9077e5212d
commit 22ff53013a
2 changed files with 10 additions and 1 deletions

View File

@ -107,7 +107,12 @@ namespace dxvk {
params.AutoDepthStencilFormat = d3d9::D3DFORMAT(pParams->AutoDepthStencilFormat); params.AutoDepthStencilFormat = d3d9::D3DFORMAT(pParams->AutoDepthStencilFormat);
params.Flags = pParams->Flags; params.Flags = pParams->Flags;
// D3DPRESENT_RATE_UNLIMITED is unsupported, use D3DPRESENT_RATE_DEFAULT (or 0)
if (unlikely(pParams->FullScreen_RefreshRateInHz == D3DPRESENT_RATE_UNLIMITED)) {
params.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
} else {
params.FullScreen_RefreshRateInHz = pParams->FullScreen_RefreshRateInHz; params.FullScreen_RefreshRateInHz = pParams->FullScreen_RefreshRateInHz;
}
// FullScreen_PresentationInterval -> PresentationInterval // FullScreen_PresentationInterval -> PresentationInterval
params.PresentationInterval = PresentationInterval; params.PresentationInterval = PresentationInterval;

View File

@ -191,6 +191,10 @@ namespace d3d9 {
#define D3DDEVINFOID_VERTEXSTATS 6 // Aka D3DDEVINFOID_D3DVERTEXSTATS #define D3DDEVINFOID_VERTEXSTATS 6 // Aka D3DDEVINFOID_D3DVERTEXSTATS
#endif #endif
#ifndef D3DPRESENT_RATE_UNLIMITED
#define D3DPRESENT_RATE_UNLIMITED 0x7FFFFFFF
#endif
#else // _MSC_VER #else // _MSC_VER
// These are enum typedefs in the MinGW headers, but not defined by Microsoft // These are enum typedefs in the MinGW headers, but not defined by Microsoft