openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
753 stars 365 forks source link

Add `vsync` property to windows for native targets #1698

Open Starmapo opened 1 year ago

Starmapo commented 1 year ago

Currently, setting a window's VSync value is only possible from the Project.xml file. This pull request adds the vsync property to lime.ui.Window, which allows for getting and setting the VSync value during runtime. Useful if you want to let the user decide if they want VSync enabled.

This is only implemented for native targets, and doesn't work for Flash or HTML5 applications, though I don't know if they support VSync.

Dimensionscape commented 1 year ago

Which platforms have you tested this on?

Starmapo commented 1 year ago

Which platforms have you tested this on?

Windows.

Dimensionscape commented 1 year ago

Thank you. This is a nice addition.

SomeGuyWhoLovesCoding commented 3 months ago

Currently, setting a window's VSync value is only possible from the Project.xml file. This pull request adds the vsync property to lime.ui.Window, which allows for getting and setting the VSync value during runtime. Useful if you want to let the user decide if they want VSync enabled.

This is only implemented for native targets, and doesn't work for Flash or HTML5 applications, though I don't know if they support VSync.

HTML5 has vsync enabled by dwfault anyway, and for flash, hmmmmm... We don't know yet