# Switch NX2 - read when the Lichii GUI starts.
# One NAME=VALUE per line. Lines starting with # are ignored.
# A variable already set in the environment wins over this file.
# Between files, the user copy (%APPDATA%\eden\nx2_switches.txt, or
# $XDG_CONFIG_HOME/eden/nx2_switches.txt) wins over this one, so editing this file is never
# needed: copy the lines you want into your own and restart.
# Beside-application files accept EDEN_NX2_* and the emulator's diagnostic switches only.
# Host environment settings, including library paths such as EDEN_STREAMLINE_DIR, must be
# set in the real environment or the user configuration file at an absolute config location.
#
# Restart the emulator after editing.

# --- Performance tuning defaults for Switch 2 ---
# Offload GPU method/macro execution to the back thread (SPLIT=2 delivers up to +54% FPS alone).
EDEN_NX2_SPLIT=2

# Batch GPU fence syncpoints to reduce host driver overhead and smooth frametimes.
EDEN_NX2_FENCE_BATCH=1

# Leave buffer downloads disabled on Switch 2 (default): forcing downloads (=1) copies back
# 90-220 MB/s of buffers CPU never touches, causing heavy mutex contention and dropping FPS by ~38-63%.
#EDEN_NX2_BUFFER_DOWNLOADS=1

# Paces frame submission 2 frames ahead. Reduces frametime spikes, but adds ~1-2 frames of input latency.
# Enable only if frame pacing stability is preferred over responsive controls.
#EDEN_NX2_FRAMES_AHEAD=2

# --- Workarounds / Debug ---
# Terrain/indirect drawing fix for Donkey Kong Bananza: enabled by default. Set to 0 only to leave to GPU.
#EDEN_NX2_RESETFIX=0

# Drop reactive-flushing read traps on Switch 2 programs (opt-in; can reduce FPS from 29 to 24 in MKW).
#EDEN_NX2_NO_REACTIVE=1

#EDEN_NX2_MME_JIT=0
#EDEN_NX2_PBFLUSH=0
#EDEN_NX2_SKIP_SAME=0
#EDEN_NX2_INLINE_DEFER=0
#EDEN_NX2_SPLIT_SKIP=1
#EDEN_NX2_AUTO_STUB=1
#EDEN_NX2_KEEP_ASTC=1
