mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[dxgi] Store device pointer in DxgiSwapChainDispatcher
This commit is contained in:
parent
53a0c3726c
commit
e311f25287
@ -177,7 +177,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
// Wrap object in swap chain dispatcher
|
||||
*ppSwapChain = new DxgiSwapChainDispatcher(frontendSwapChain.ref());
|
||||
*ppSwapChain = new DxgiSwapChainDispatcher(frontendSwapChain.ref(), pDevice);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,9 @@ namespace dxvk {
|
||||
|
||||
public:
|
||||
|
||||
DxgiSwapChainDispatcher(IDXGISwapChain4* dispatch)
|
||||
: m_dispatch(dispatch) {
|
||||
DxgiSwapChainDispatcher(IDXGISwapChain4* dispatch, IUnknown* device)
|
||||
: m_device(device),
|
||||
m_dispatch(dispatch) {
|
||||
}
|
||||
|
||||
virtual ~DxgiSwapChainDispatcher() {
|
||||
@ -296,6 +297,10 @@ namespace dxvk {
|
||||
|
||||
private:
|
||||
|
||||
// m_device is not used or reference counted, provided for compatibility with mod engines
|
||||
// which expect to find device pointer in the memory after swapchain interface.
|
||||
IUnknown* m_device;
|
||||
|
||||
IDXGISwapChain4* m_dispatch;
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user