Repository navigation
Vertical Sync setting, VRR and Android refresh rate (#67) - #72
Merged
Merged
Conversation
- Settings > Display > Vertical Sync (Off / On, saved as vsync, PSPRECOMP_VSYNC=0|1; "0" used to mean on): On = Vulkan FIFO / GL swap interval -1 (adaptive) or 1, which on a FreeSync / G-Sync / HDMI VRR display lets the refresh follow the game. Switches while running: the Vulkan layer rebuilds its swapchain at the next swap (the HDR switch path), GL sets the swap interval on the presenting thread. - Android asks the display for a refresh rate matching the game's frame rate (ANativeWindow_setFrameRate, looked up at run time, Android 11+), again whenever the surface is recreated. - PSPRECOMP_PRESENT_STATS=1: [PRESENT_STATS] present-to-present timing every 5 s. Test-script command `vsync 0|1`; battle_test.py BT_DISPLAY_MODE=fullscreen. New runtime file psp_present_sync.cpp (ARCHITECTURE.md), docs in ENV_FLAGS.md, GRAPHICS.md, testing.md, steamdeck.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dlsym(RTLD_DEFAULT) does not reach it from the app's linker namespace, and libandroid.so does not always re-export it (Android 15 emulator): open libnativewindow.so first, then libandroid.so, and log why when neither has it. Checked on the Android 15 emulator: "asked the display for 90 Hz (ANativeWindow_setFrameRate -> 0)" and SurfaceFlinger lists the game's SurfaceView with requestedFrameRate 90.00 Hz. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schindlershadow
force-pushed
the
vrr-pacing
branch
from
November 16, 2026 18:11
4813478 to
6095741
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vertical sync is now a setting, which makes VRR displays work as intended; Android asks the display for a matching refresh rate; present timing can be logged.
vsync,PSPRECOMP_VSYNC=0|1). Off is the old behaviour (Vulkan IMMEDIATE / MAILBOX, GL swap interval 0) and stays the default on PCs. On = Vulkan FIFO, GL swap interval -1 (adaptive) or 1: no tearing, and on a FreeSync / G-Sync / HDMI VRR display the refresh follows the game. It switches while running (the Vulkan layer rebuilds its swapchain at the next swap, the same path as the HDR switch).PSPRECOMP_VSYNC=0used to mean on (any value did); now it means off.ANativeWindow_setFrameRatewith the game's frame rate (looked up at run time in libnativewindow, then libandroid; Android 11+), again when the surface is recreated.PSPRECOMP_PRESENT_STATS=1logs[PRESENT_STATS](present-to-present mean / sd / median / p99 / max / uneven) every 5 s; test-script commandvsync 0|1;battle_test.pyBT_DISPLAY_MODE=fullscreen.psp_present_sync.cpp(ARCHITECTURE.md); docs in ENV_FLAGS.md, GRAPHICS.md, testing.md, steamdeck.md.Tested:
asked the display for 90 Hz (ANativeWindow_setFrameRate -> 0), and SurfaceFlinger lists the game's SurfaceView withrequestedFrameRate 90.00 Hz.Closes #67
Release notes
🤖 Generated with Claude Code