feat: add vsync-priority frame pacing to video backends
Present now dispatches through a function pointer chosen at init and re-chosen by two new runtime setters: real vsync if requested and the driver grants it, else a manual sleep-based cap (auto-detects display refresh rate, falls back to 60fps if that can't be queried), else fully uncapped. skele_video_using_vsync() reports what was actually granted; skele_video_set_vsync()/skele_video_set_max_fps() let a game change either live without tearing down the renderer/GL context.
This commit is contained in:
@@ -30,7 +30,8 @@ int main(int argc, char *argv[])
|
||||
video_cfg.render_height = SKELE_DEFAULT_RENDER_HEIGHT;
|
||||
video_cfg.window_width = 0;
|
||||
video_cfg.window_height = 0;
|
||||
video_cfg.flags = 0;
|
||||
video_cfg.max_fps = 0;
|
||||
video_cfg.flags = SKELE_VIDEO_VSYNC;
|
||||
|
||||
if (skele_video_init(video_cfg) != SKELE_INIT_SUCCESS) {
|
||||
skele_stk_teardown();
|
||||
|
||||
Reference in New Issue
Block a user