fix fetching of lv2 params
This commit is contained in:
parent
dd1b493da2
commit
b5512c45fb
1 changed files with 2 additions and 2 deletions
|
@ -378,7 +378,7 @@ pub const Lang = struct {
|
||||||
cmd.split = try std.fmt.parseInt(usize, tok_it.next().?, 10);
|
cmd.split = try std.fmt.parseInt(usize, tok_it.next().?, 10);
|
||||||
cmd.index = try std.fmt.parseInt(usize, tok_it.next().?, 10);
|
cmd.index = try std.fmt.parseInt(usize, tok_it.next().?, 10);
|
||||||
|
|
||||||
inline for (@typeInfo(@typeOf(command_struct.parameters)).Struct.fields) |cmd_field| {
|
inline for (@typeInfo(@TypeOf(cmd.parameters)).Struct.fields) |cmd_field| {
|
||||||
const arg = tok_it.next().?;
|
const arg = tok_it.next().?;
|
||||||
const argument_value = switch (cmd_field.field_type) {
|
const argument_value = switch (cmd_field.field_type) {
|
||||||
f32 => try std.fmt.parseFloat(f32, arg),
|
f32 => try std.fmt.parseFloat(f32, arg),
|
||||||
|
@ -391,7 +391,7 @@ pub const Lang = struct {
|
||||||
argument_value,
|
argument_value,
|
||||||
});
|
});
|
||||||
|
|
||||||
@field(cmd.params, cmd_field.name) = argument_value;
|
@field(cmd.parameters, cmd_field.name) = argument_value;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
inline for (@typeInfo(command_struct).Struct.fields) |cmd_field| {
|
inline for (@typeInfo(command_struct).Struct.fields) |cmd_field| {
|
||||||
|
|
Loading…
Reference in a new issue