From 5c87fe955e0e713507fb8aafb46065e9ffa902c7 Mon Sep 17 00:00:00 2001 From: gucio321 <73652197+gucio321@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:03:16 +0100 Subject: [PATCH] master window: add SetFPS method fix #770 --- MasterWindow.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MasterWindow.go b/MasterWindow.go index d3fc622e..d9ec044b 100644 --- a/MasterWindow.go +++ b/MasterWindow.go @@ -272,6 +272,12 @@ func (w *MasterWindow) SetBgColor(bgColor color.Color) { w.backend.SetBgColor(w.clearColor) } +// SetTargetFPS sets target FPS of master window. +// Default for GLFW is 30. +func (w *MasterWindow) SetTargetFPS(fps uint) { + w.backend.SetTargetFPS(fps) +} + // GetPos return position of master window. func (w *MasterWindow) GetPos() (x, y int) { var xResult, yResult int32