From 33812403cfc561e4c62c3a62cc8255b87a6ffde9 Mon Sep 17 00:00:00 2001 From: Bassel Mabsout <7851037+bmabsout@users.noreply.github.com> Date: Thu, 8 Feb 2024 18:19:00 -0500 Subject: [PATCH] returned floats to timing variables and removed unsigned int in Shader.java --- .../main/java/com/OxGames/OxShell/Wallpaper/Shader.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/OxGames/OxShell/Wallpaper/Shader.java b/app/src/main/java/com/OxGames/OxShell/Wallpaper/Shader.java index 5c7f56e..01822b1 100644 --- a/app/src/main/java/com/OxGames/OxShell/Wallpaper/Shader.java +++ b/app/src/main/java/com/OxGames/OxShell/Wallpaper/Shader.java @@ -56,7 +56,7 @@ public class Shader { private int targetFPS = 30; private long startTime; - private unsigned int frame; + private int frame; private long prevTime; private FloatBuffer quadVertices; @@ -325,9 +325,9 @@ protected void draw() { frame++; long currentTime = System.currentTimeMillis() - startTime; - double secondsElapsed = (currentTime) / 1000.0; // will be input into shader as iTime - double deltaTime = (currentTime - prevTime) / 1000.0; - double fps = 1 / deltaTime; + float secondsElapsed = (currentTime) / 1000.0; // will be input into shader as iTime + float deltaTime = (currentTime - prevTime) / 1000.0; + float fps = 1 / deltaTime; prevTime = currentTime; if (secondsElapsed > 60 * 60 * 24 || Double.isNaN(fps) || Double.isNan(deltaTime)) { frame = 0;