mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
On recent drivers, double buffered DirectDraw flips no longer wait for the vertical sync before returning and instead just insert the flip into the flip queue for later execution. This effectively results in triple buffered behavior (in the render-ahead sense) and causes up to an extra frame of latency even if the flip queue size is set to 1. To restore the legacy double buffered behavior, each flip waits for the presented frame to leave the flip queue before returning. To restore the legacy triple buffered behavior, the flip queue size is forced to 1. This causes the flip to wait if the previous flip is still pending.
12 lines
184 B
C++
12 lines
184 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace D3dDdi
|
|
{
|
|
UINT getDdiVersion();
|
|
void installHooks();
|
|
void onUmdFileNameQueried(const std::wstring& umdFileName);
|
|
void uninstallHooks();
|
|
}
|