fix: gamescope issues in 1.4.1 (lsfg fps limit)
Description
Two gamescope fixes for 1.4.1, both about the frame limiter with frame generation on.
The cap now reaches the shim. It was disarmed whenever frame generation was armed (setFpsLimit(if (lsfg) 0 else limit)), so a session at cap 60 ×2 reached the shim as cap=0 and took its no-cap row (refresh / m acquires). The cap the user set never arrived, and the HUD showed a rate nobody asked for. Measured on Nova before: declared=mailbox source=generating cap=0 lsfg=1 acquire=30. After: two cap changes in one session read cap=60 acquire=60 and then cap=70 acquire=70.
Payload 20261120.1, carrying GameNative/gamenative-drm#71: generation's leftover is spent as a rate instead of being floored to whole frames per source. At 60 Hz, cap 40, ×2 the panel leaves 20 generated against 40 source frames — one every other frame — and the old rule produced none, so generation did nothing above half the refresh while the panel still had room.
| setting | total | before | after |
|---|---|---|---|
| cap 70 ×2, 120 Hz | 70 + 50 = 120 | 70 + 0 = 70 | 70 + 50 = 120 |
| cap 40 ×2, 60 Hz | 40 + 20 = 60 | 40 + 0 = 40 | 40 + 20 = 60 |
The payload archive is not in this PR (it is gitignored and ships as a release asset); only the GamescopePayload.VERSION bump is.
Not verified end to end. The app-side cap was confirmed on a device by reading the shim's census in the two sessions above; the payload half is compiled and unit-tested (130 tests, clippy clean) but has not been read back from a device yet. Expected after installing this build: acquire tracks the cap in every session, and a cap above half the refresh shows generated frames where it previously showed none.
Recording
Type of Change
- Bug fix
- Performance / stability improvement
- Compatibility improvements
- Other (requires prior approval)
Checklist
- If I have access to
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed. - This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
- I have attached a recording of the change.
- I have read and agree to the contribution guidelines in
CONTRIBUTING.md.