fix: reimplement grabbing ROM title if provided via cmd arg

This commit is contained in:
2023-03-27 16:22:07 -05:00
parent b879c76510
commit 1d8b21d6b4
4 changed files with 10 additions and 8 deletions

View File

@@ -90,8 +90,10 @@ pub fn main() void {
cpu.fastBoot();
}
const title_ptr = if (paths.rom != null) &bus.pak.title else null;
// TODO: Just copy the title instead of grabbing a pointer to it
var gui = Gui.init(allocator, &bus.apu) catch |e| exitln("failed to init gui: {}", .{e});
var gui = Gui.init(allocator, &bus.apu, title_ptr) catch |e| exitln("failed to init gui: {}", .{e});
defer gui.deinit();
var quit = std.atomic.Atomic(bool).init(false);