From 690ab89cfddbc1d513776eee2e388a64f5894fb1 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 31 May 2020 22:27:38 -0300 Subject: [PATCH] allow any typed command to use lv2 param parse logic --- src/lang.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lang.zig b/src/lang.zig index 05f631f..329aa7e 100644 --- a/src/lang.zig +++ b/src/lang.zig @@ -521,7 +521,7 @@ pub const Lang = struct { var cmd = try self.allocator.create(command_struct); const is_lv2_command = switch (command_struct.base_tag) { .noop, .load, .quicksave, .runqs, .rotate => false, - else => command_struct.command_type == .lv2_command, + else => true, }; // TODO: crash when no arguments are left but we still need @@ -543,7 +543,6 @@ pub const Lang = struct { cmd.split = try std.fmt.parseInt(usize, split.?, 10); cmd.index = try std.fmt.parseInt(usize, index.?, 10); - // All parameters for LV2 plugins are f32. inline for (@typeInfo(@TypeOf(cmd.parameters)).Struct.fields) |cmd_field| { const maybe_arg = tok_it.next(); if (maybe_arg == null) {