Skip to content

Add Window frame rate preferences - #112

Open
tryk016 wants to merge 2 commits into
Try:masterfrom
tryk016:codex/pr-tempest-window-frame-rate
Open

tryk016 wants to merge 2 commits into
Try:masterfrom
tryk016:codex/pr-tempest-window-frame-rate

Conversation

@tryk016

@tryk016 tryk016 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Add Window::setPreferredFrameRate and setPreferredFrameRateRange.

On iOS, these configure the existing display link and limit rates to the window's screen. Zero FPS or a zero maximum restores the default. Other platforms ignore the setting. iPhone apps still need CADisableMinimumFrameDurationOnPhone to request rates above 60 Hz.

Tested on iOS 18 and 27 simulators, including runtime changes, background/resume and window recreation. iPhoneOS/Simulator Release builds, local macOS tests, and Windows (MSVC/MinGW) and Linux CI pass.

@Try

Try commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Hi, @tryk016 and thanks for PR!

Implementation looks fine but locating those method in Window is not right. In Tempest presentation is controlled by Swapchain, not by Window - so it should be Swapchain::setPreferredFrameRate

@tryk016

tryk016 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

Done, moved both setters to Swapchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants