diff options
| author | Nicolas James <nj3ahxac@gmail.com> | 2026-03-24 11:00:30 +1100 |
|---|---|---|
| committer | Nicolas James <nj3ahxac@gmail.com> | 2026-03-24 11:00:30 +1100 |
| commit | e270ee282a776956d666230dc924941c50b1ac65 (patch) | |
| tree | 25381ddebf43bf80d9288d872dc77a248449b0a0 /src/layer_context.cc | |
| parent | 09f27da54e12343b8c639186b6b2c61253f2a99a (diff) | |
Add nvidia spoofing for GetPhysicalDeviceSurfaceCapabilities2KHR, don't advertise AntiLag when doing so
Diffstat (limited to 'src/layer_context.cc')
| -rw-r--r-- | src/layer_context.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/layer_context.cc b/src/layer_context.cc index 28a94b5..4699202 100644 --- a/src/layer_context.cc +++ b/src/layer_context.cc @@ -4,12 +4,15 @@ #include <string_view> namespace low_latency { - + LayerContext::LayerContext() { - this->is_antilag_1_enabled = []() -> auto { - const auto env = std::getenv(LayerContext::SLEEP_AFTER_PRESENT_ENV); + const auto parse_bool_env = [](const auto& name) -> bool { + const auto env = std::getenv(name); return env && std::string_view{env} == "1"; - }(); + }; + + this->is_antilag_1_enabled = parse_bool_env(SLEEP_AFTER_PRESENT_ENV); + this->should_spoof_nvidia = parse_bool_env(SPOOF_NVIDIA_ENV); } LayerContext::~LayerContext() {} |
