This commit is contained in:
Luna 2020-05-31 21:55:44 -03:00
parent 83996b889f
commit 2b4f428890

View file

@ -234,14 +234,14 @@ pub const Runner = struct {
defer params.deinit(); defer params.deinit();
inline for (@typeInfo(@TypeOf(command.parameters)).Struct.fields) |cmd_field| { inline for (@typeInfo(@TypeOf(command.parameters)).Struct.fields) |cmd_field| {
try params.put( _ = try params.put(
cmd_field.name, cmd_field.name,
@field(command.parameters, cmd_field.name), @field(command.parameters, cmd_field.name),
); );
} }
var image = try self.getImage(); var image = try self.getImage();
try image.runCustomPlugin(typ.plugin_type, pos, map); try image.runCustomPlugin(@TypeOf(command).plugin_type, pos, &params);
} }
fn newRunCommandSingle( fn newRunCommandSingle(
@ -261,7 +261,7 @@ pub const Runner = struct {
const ctype = typ.command_type; const ctype = typ.command_type;
switch (ctype) { switch (ctype) {
.lv2_command => try self.executeLV2Command(command.*), .lv2_command => try self.executeLV2Command(command.*),
.plugin_command => try self.executePlugin(command.*), .custom_command => try self.executePlugin(command.*),
else => @panic("TODO support command type"), else => @panic("TODO support command type"),
} }
} }