mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-09-21 04:45:48 +00:00
Hide the new LFX changes behind a config setting
This commit is contained in:
@@ -354,7 +354,7 @@ namespace nvd {
|
||||
lowlatency_ctx.mark_end_of_rendering();
|
||||
break;
|
||||
case RENDERSUBMIT_END:
|
||||
lowlatency_ctx.lfx_end_frame();
|
||||
if (lowlatency_ctx.aggressive_lfx) lowlatency_ctx.lfx_end_frame();
|
||||
break;
|
||||
}
|
||||
return OK();
|
||||
|
||||
@@ -119,6 +119,7 @@ public:
|
||||
uint64_t calls_without_sleep = 0;
|
||||
bool fg = false;
|
||||
bool active = true;
|
||||
bool aggressive_lfx = false;
|
||||
|
||||
inline void init_al2(IUnknown *pDevice) {
|
||||
#if _MSC_VER && _WIN64
|
||||
@@ -152,6 +153,7 @@ public:
|
||||
lfx_ctx = new lfx::LatencyFleX();
|
||||
force_latencyflex = get_config(L"fakenvapi", L"force_latencyflex", false);
|
||||
force_reflex = (ForceReflex)get_config(L"fakenvapi", L"force_reflex", 0);
|
||||
aggressive_lfx = get_config(L"fakenvapi", L"aggressive_latencyflex", false);
|
||||
spdlog::info("LatencyFleX initialized");
|
||||
}
|
||||
|
||||
@@ -214,6 +216,8 @@ public:
|
||||
// Set FPS Limiter
|
||||
lfx_ctx->target_frame_time = 1000 * min_interval_us;
|
||||
|
||||
if (!aggressive_lfx) lfx_end_frame();
|
||||
|
||||
lfx_mutex.lock();
|
||||
lfx_stats.target = lfx_ctx->GetWaitTarget(lfx_stats.frame_id + 1);
|
||||
lfx_mutex.unlock();
|
||||
|
||||
Reference in New Issue
Block a user