fix(fps): HOS_FPS_LOG read by the switches' rule, so test_env_on passes on main again #2575

Merged
mooki000 merged 1 commit from fix/fps-log-env-on into main 2026-11-12 03:05:31 +00:00
mooki000 commented 2026-11-11 23:54:09 +00:00 (Migrated from github.com)

What

host/oot_high_fps.c reads its log switch with env_on("HOS_FPS_LOG") instead of getenv("HOS_FPS_LOG") != NULL. One line, one include, and the comment that describes the switch.

Why

  • The old form is the set-means-on read that #2042 retired: with it HOS_FPS_LOG=0 turned this log on, while host/nn_vi.c reads the same name with env_on.

  • tests/test_env_on.py looks for such reads, so it fails on main since #2470 brought the line (#2552 kept it). In run 43120809833 on main (eed4d912) that is the failure of Python source checks (ubuntu-24.04, part 2/2) and one of the two in Python source checks (windows-2022, part 1/2):

    FAIL: on/off switches still read as set-means-on (set to 0 they are on): use env_on:
      HOS_FPS_LOG (host/oot_high_fps.c:15)
    

How it was tested

  • tests/test_env_on.py on main 9df055f2: fails, naming host/oot_high_fps.c:16. With this change: passes.
  • tests/run_all.py --strict with test_env_on, test_menu_env_on and test_high_fps_fixes: 3 passed (Arch Linux).
  • host/oot_high_fps.c compiles with gcc and clang (-fsyntax-only -Wall -Wextra, with the generated headers of a local build).
  • Not run: the game with the switch set. The change is the read of one environment variable through the function the other host files use.

Not in this change

The same run has two more failures on Windows that this does not touch: tests/test_psychov35.py (part 1/2) and tests/test_pcache_header_read.py (part 2/2).

No issue was opened for this: it is one line and the failing test is the report.

Assisted-by: Claude Fable 5.2

## What `host/oot_high_fps.c` reads its log switch with `env_on("HOS_FPS_LOG")` instead of `getenv("HOS_FPS_LOG") != NULL`. One line, one include, and the comment that describes the switch. ## Why - The old form is the set-means-on read that #2042 retired: with it `HOS_FPS_LOG=0` turned this log on, while `host/nn_vi.c` reads the same name with `env_on`. - `tests/test_env_on.py` looks for such reads, so it fails on `main` since #2470 brought the line (#2552 kept it). In run 43120809833 on `main` (`eed4d912`) that is the failure of `Python source checks (ubuntu-24.04, part 2/2)` and one of the two in `Python source checks (windows-2022, part 1/2)`: ``` FAIL: on/off switches still read as set-means-on (set to 0 they are on): use env_on: HOS_FPS_LOG (host/oot_high_fps.c:15) ``` ## How it was tested - `tests/test_env_on.py` on `main` `9df055f2`: fails, naming `host/oot_high_fps.c:16`. With this change: passes. - `tests/run_all.py --strict` with `test_env_on`, `test_menu_env_on` and `test_high_fps_fixes`: 3 passed (Arch Linux). - `host/oot_high_fps.c` compiles with `gcc` and `clang` (`-fsyntax-only -Wall -Wextra`, with the generated headers of a local build). - Not run: the game with the switch set. The change is the read of one environment variable through the function the other host files use. ## Not in this change The same run has two more failures on Windows that this does not touch: `tests/test_psychov35.py` (part 1/2) and `tests/test_pcache_header_read.py` (part 2/2). No issue was opened for this: it is one line and the failing test is the report. Assisted-by: Claude Fable 5.2
Commenting is not possible because the repository is archived.
No description provided.