Skip to content

Pass VSync toggle during rendering rather than only at startup - #363

Open
Acissathar wants to merge 1 commit into
ProwlEngine:mainfrom
Acissathar:fix-vsync-toggling
Open

Pass VSync toggle during rendering rather than only at startup#363
Acissathar wants to merge 1 commit into
ProwlEngine:mainfrom
Acissathar:fix-vsync-toggling

Conversation

@Acissathar

Copy link
Copy Markdown
Contributor

The swap interval is pushed once, at Start(). InternalWindow.VSync is the property Silk's own render loop would consult — and Prowl doesn't use that loop. So the setter updates a value nobody reads, and the toggle can never do anything at runtime. It only works via InitWindow's options because Start() reads it once afterwards.

This change makes it so that the setter now also stores it as a pending swap, which is read during the render loop as it needs the context.

I know there was mention on the Editor VSync issue (which this also covers in addition to builds) about looking into a more robust solution (framerate caps, etc.) so just wanted to at least throw this up should someone else want it if this isn't something that you want merged in lieu of the other solution.

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.

1 participant