~mil/mepo

1975140c0a7f3959b75e250a636e2b67d248b113 — Miles Alan a month ago 9fac14e
Implement signals save state
1 files changed, 13 insertions(+), 2 deletions(-)

M src/api/filedump.zig
M src/api/filedump.zig => src/api/filedump.zig +13 -2
@@ 85,10 85,21 @@ fn filedump(mepo: *Mepo, save_types: []const u8, filepath: []const u8) !void {
            try lines.append(statement_click);
        }

        // Signals
        var it_sigs = mepo.table_signals.iterator();
        while (it_sigs.next()) |sig| {
            const signame = if (sig.key_ptr.* == std.os.SIG.USR1) "USR1" else "USR2";
            const statement_signal = try std.fmt.allocPrint(
                arena.allocator(),
                "bind_signal {s} [{s}];",
                .{signame, sig.value_ptr.*},
            );
            try lines.append(statement_signal);
        }


        // - TODO: Bind_button table
        // - TODO: Bind_key table
        // - TODO: Bind_signal table
        // - TODO: Bind_button table
    }

    // 3. Pins data