Stop calling RTSS's EnumProfiles, which crashed the game at start where RivaTuner Statistics Server runs.

EnumProfiles walks RTSS's Profiles\*.cfg with _findfirst and _findnext and keeps the find handle in 32 bits. The handle
points into the process heap, which lies above 4 GB here because the guest address space takes the low part (memory.c
mem_init), so _findnext gets a cut pointer and faults in ntdll: the crash report then ends the game with code 71 before
the title screen (issue #231). rtss_limit.c profile_exists now looks for Profiles\<name>.cfg in RTSS's folder, which is
what EnumProfiles reports. NX2NAVI_RTSS_ENUM=1 calls EnumProfiles again, to test an RTSS that keeps the whole handle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-09 11:22:38 -05:00
parent 7db0c5c75b
commit 91acff672c
3 changed files with 21 additions and 7 deletions

View File

@@ -21,6 +21,9 @@
# it, or with frame generation on, the game limits by itself, and also when RTSS's own frame counter shows the game
# well past the limit (RTSS then hooks the game without holding it back). rtss = 0 always leaves it to the game.
# rtss = 1
# 1: asks RTSS's EnumProfiles whether the game's profile exists, instead of looking for its file. EnumProfiles crashes
# the game (RTSS keeps a pointer of the game's in 32 bits); only for testing an RTSS that fixed it.
# rtss_enum = 0
# Older key, read only while fps_limit is unset: fps60 = 0 means a limit of 30.
# fps60 = 1
# Real-time frame step: game speed follows the clock instead of the frame count.