mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[dxgi] Add option to override the sync interval
This commit is contained in:
parent
d7b16dd90a
commit
2541aeb25c
@ -40,6 +40,7 @@ namespace dxvk {
|
||||
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
|
||||
|
||||
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
|
||||
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
|
||||
}
|
||||
|
||||
}
|
@ -41,6 +41,10 @@ namespace dxvk {
|
||||
/// Back buffer count for the Vulkan swap chain.
|
||||
/// Overrides DXGI_SWAP_CHAIN_DESC::BufferCount.
|
||||
int32_t numBackBuffers;
|
||||
|
||||
/// Sync interval. Overrides the value
|
||||
/// passed to IDXGISwapChain::Present.
|
||||
int32_t syncInterval;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -288,6 +288,9 @@ namespace dxvk {
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb174576(v=vs.85).aspx
|
||||
SyncInterval = std::min<UINT>(SyncInterval, 4);
|
||||
|
||||
if (options->syncInterval >= 0)
|
||||
SyncInterval = options->syncInterval;
|
||||
|
||||
try {
|
||||
// If in fullscreen mode, apply any updated gamma curve
|
||||
// if it has been changed since the last present call.
|
||||
|
Loading…
Reference in New Issue
Block a user