fix: pass none.gba and kind of sram.gba from jsmolka test suite

This commit is contained in:
2022-04-08 14:38:35 -03:00
parent 6df55c2d86
commit a976a5769e
3 changed files with 25 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ pub fn init(alloc: Allocator, rom_path: []const u8, save_path: ?[]const u8) !Sel
defer alloc.free(file_buf);
const title = parseTitle(file_buf);
const kind = Backup.guessKind(file_buf) orelse .Sram;
const kind = Backup.guessKind(file_buf) orelse .None;
const buf = try alloc.alloc(u8, 0x200_0000); // 32MiB
@@ -40,6 +40,7 @@ pub fn init(alloc: Allocator, rom_path: []const u8, save_path: ?[]const u8) !Sel
.backup = try Backup.init(alloc, kind, title, save_path),
};
pak.parseHeader();
log.info("Backup: {}", .{kind});
return pak;
}