add split and index when printing custom/lv2 cmds

This commit is contained in:
Luna 2020-06-02 16:00:54 -03:00
parent 5235482ab4
commit d6c92c0231

View file

@ -3,6 +3,7 @@ const langs = @import("lang.zig");
fn printCommandWithParams(stream: var, command: var) !void { fn printCommandWithParams(stream: var, command: var) !void {
const Parameters = @TypeOf(command.parameters); const Parameters = @TypeOf(command.parameters);
try stream.print(" {} {}", .{ command.split, command.index });
inline for (@typeInfo(Parameters).Struct.fields) |field| { inline for (@typeInfo(Parameters).Struct.fields) |field| {
if (field.field_type == f32 or field.field_type == f64) { if (field.field_type == f32 or field.field_type == f64) {
try stream.print(" {d}", .{@field(command.parameters, field.name)}); try stream.print(" {d}", .{@field(command.parameters, field.name)});