feature: Attempt to decrease load by decreasing max frame rate of window

We don't really need to run at twice the speed of the display's refresh
rate as Raylib manages the target time between frames well.
This commit is contained in:
Tera << 8 2025-06-27 12:48:25 -04:00
parent 59dbdf9eb0
commit 30e90af276
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37

View file

@ -118,7 +118,7 @@ func mainEntrypoint(context.Context, *cli.Command) error {
bufio.NewReader(os.Stdin).ReadBytes('\n') // Wait for Enter key press before continuing bufio.NewReader(os.Stdin).ReadBytes('\n') // Wait for Enter key press before continuing
log.Info("Initializing XR headset") log.Info("Initializing XR headset")
rl.SetTargetFPS(int32(displayMetadata.MaxRefreshRate * 2)) rl.SetTargetFPS(int32(displayMetadata.MaxRefreshRate))
rl.InitWindow(int32(displayMetadata.MaxWidth), int32(displayMetadata.MaxHeight), "UnrealXR") rl.InitWindow(int32(displayMetadata.MaxWidth), int32(displayMetadata.MaxHeight), "UnrealXR")
atexit.Register(func() { atexit.Register(func() {