mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-09-24 06:15:42 +00:00
Fix activate deactivate loop
This commit is contained in:
@@ -68,8 +68,8 @@ class IFGFeature
|
||||
std::optional<UINT> _interpolationTop[BUFFER_COUNT];
|
||||
UINT _reset[BUFFER_COUNT] = {};
|
||||
|
||||
UINT64 _frameCount = 0;
|
||||
UINT64 _lastDispatchedFrame = -1;
|
||||
UINT64 _frameCount = 1;
|
||||
UINT64 _lastDispatchedFrame = 0;
|
||||
UINT64 _willDispatchFrame = 0;
|
||||
|
||||
bool _isActive = false;
|
||||
|
||||
@@ -397,7 +397,7 @@ void* FSRFG_Dx12::SwapchainContext()
|
||||
|
||||
void FSRFG_Dx12::DestroyFGContext()
|
||||
{
|
||||
_frameCount = 0;
|
||||
_frameCount = 1;
|
||||
_lastDispatchedFrame = 0;
|
||||
_willDispatchFrame = 0;
|
||||
|
||||
@@ -692,6 +692,8 @@ void FSRFG_Dx12::Deactivate()
|
||||
if (result == FFX_API_RETURN_OK)
|
||||
_isActive = false;
|
||||
|
||||
_lastDispatchedFrame = 0;
|
||||
|
||||
LOG_INFO("D3D12_Configure Enabled: false, result: {} ({})", magic_enum::enum_name((FfxApiReturnCodes) result),
|
||||
(UINT) result);
|
||||
}
|
||||
|
||||
@@ -425,6 +425,8 @@ void XeFG_Dx12::Deactivate()
|
||||
if (result == XEFG_SWAPCHAIN_RESULT_SUCCESS)
|
||||
_isActive = false;
|
||||
|
||||
_lastDispatchedFrame = 0;
|
||||
|
||||
LOG_INFO("SetEnabled: false, result: {} ({})", magic_enum::enum_name(result), (UINT) result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user