terminal/kitty-gfx: only enable on Metal for now

This commit is contained in:
Mitchell Hashimoto
2023-08-23 17:07:50 -07:00
parent 46ba3189f6
commit 23c7d95ee1

View File

@ -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) {