From 39e70558533270ef367367fbd41ad449014427b9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 17 Nov 2023 20:48:20 -0800 Subject: [PATCH] renderer/opengl: enable animations --- src/renderer/OpenGL.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig index 3d3f05d29..909388a78 100644 --- a/src/renderer/OpenGL.zig +++ b/src/renderer/OpenGL.zig @@ -475,6 +475,13 @@ pub fn threadExit(self: *const OpenGL) void { } } +/// True if our renderer has animations so that a higher frequency +/// timer is used. +pub fn hasAnimations(self: *const OpenGL) bool { + const state = self.gl_state orelse return false; + return state.custom != null; +} + /// Callback when the focus changes for the terminal this is rendering. /// /// Must be called on the render thread.