From 23c7d95ee1122dcf85199c1bf483322626dfda80 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 23 Aug 2023 17:07:50 -0700 Subject: [PATCH] terminal/kitty-gfx: only enable on Metal for now --- src/terminal/kitty/graphics_exec.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/terminal/kitty/graphics_exec.zig b/src/terminal/kitty/graphics_exec.zig index 5172f779b..b6f00f12a 100644 --- a/src/terminal/kitty/graphics_exec.zig +++ b/src/terminal/kitty/graphics_exec.zig @@ -2,6 +2,7 @@ const std = @import("std"); const assert = std.debug.assert; const Allocator = std.mem.Allocator; +const renderer = @import("../../renderer.zig"); const point = @import("../point.zig"); const Terminal = @import("../Terminal.zig"); const command = @import("graphics_command.zig"); @@ -31,6 +32,9 @@ pub fn execute( // if this feature is not supported. if (!terminal.screen.kitty_images.enabled()) return null; + // Only Metal supports rendering the images, right now. + if (comptime renderer.Renderer != renderer.Metal) return null; + log.debug("executing kitty graphics command: {}", .{cmd.control}); const resp_: ?Response = switch (cmd.control) {