mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxgi] Add NotifyModeChange method to IDXGIVkSwapChain
This commit is contained in:
parent
8b67ef724e
commit
e281eee795
@ -233,6 +233,22 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void STDMETHODCALLTYPE D3D11SwapChain::NotifyModeChange(
|
||||||
|
BOOL Windowed,
|
||||||
|
const DXGI_MODE_DESC* pDisplayMode) {
|
||||||
|
if (Windowed || !pDisplayMode) {
|
||||||
|
// Display modes aren't meaningful in windowed mode
|
||||||
|
m_displayRefreshRate = 0.0;
|
||||||
|
} else {
|
||||||
|
DXGI_RATIONAL rate = pDisplayMode->RefreshRate;
|
||||||
|
m_displayRefreshRate = double(rate.Numerator) / double(rate.Denominator);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_presenter != nullptr)
|
||||||
|
m_presenter->setFrameRateLimiterRefreshRate(m_displayRefreshRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT D3D11SwapChain::PresentImage(UINT SyncInterval) {
|
HRESULT D3D11SwapChain::PresentImage(UINT SyncInterval) {
|
||||||
Com<ID3D11DeviceContext> deviceContext = nullptr;
|
Com<ID3D11DeviceContext> deviceContext = nullptr;
|
||||||
m_parent->GetImmediateContext(&deviceContext);
|
m_parent->GetImmediateContext(&deviceContext);
|
||||||
|
@ -69,6 +69,10 @@ namespace dxvk {
|
|||||||
UINT PresentFlags,
|
UINT PresentFlags,
|
||||||
const DXGI_PRESENT_PARAMETERS* pPresentParameters);
|
const DXGI_PRESENT_PARAMETERS* pPresentParameters);
|
||||||
|
|
||||||
|
void STDMETHODCALLTYPE NotifyModeChange(
|
||||||
|
BOOL Windowed,
|
||||||
|
const DXGI_MODE_DESC* pDisplayMode);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum BindingIds : uint32_t {
|
enum BindingIds : uint32_t {
|
||||||
|
@ -75,6 +75,10 @@ IDXGIVkSwapChain : public IUnknown {
|
|||||||
UINT SyncInterval,
|
UINT SyncInterval,
|
||||||
UINT PresentFlags,
|
UINT PresentFlags,
|
||||||
const DXGI_PRESENT_PARAMETERS* pPresentParameters) = 0;
|
const DXGI_PRESENT_PARAMETERS* pPresentParameters) = 0;
|
||||||
|
|
||||||
|
virtual void STDMETHODCALLTYPE NotifyModeChange(
|
||||||
|
BOOL Windowed,
|
||||||
|
const DXGI_MODE_DESC* pDisplayMode) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user