mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-13 19:29:14 +01:00
[dxgi] Duplicate frame latency handle
Apps can call CloseHandle on this.
This commit is contained in:
parent
11ef172c79
commit
17320776f0
@ -115,7 +115,18 @@ namespace dxvk {
|
||||
|
||||
|
||||
HANDLE STDMETHODCALLTYPE D3D11SwapChain::GetFrameLatencyEvent() {
|
||||
return m_frameLatencyEvent;
|
||||
HANDLE result = nullptr;
|
||||
|
||||
if (!m_processHandle)
|
||||
m_processHandle = GetCurrentProcess();
|
||||
|
||||
if (!DuplicateHandle(m_processHandle, m_frameLatencyEvent,
|
||||
m_processHandle, &result, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
Logger::err("DxgiSwapChain::GetFrameLatencyWaitableObject: DuplicateHandle failed");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
@ -109,6 +109,8 @@ namespace dxvk {
|
||||
HANDLE m_frameLatencyEvent = nullptr;
|
||||
Rc<sync::CallbackFence> m_frameLatencySignal;
|
||||
|
||||
HANDLE m_processHandle = nullptr;
|
||||
|
||||
bool m_dirty = true;
|
||||
bool m_vsync = true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user