summaryrefslogtreecommitdiff
path: root/genesis.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2018-11-16 19:56:24 -0800
committerMichael Pavone <pavone@retrodev.com>2018-11-16 19:56:24 -0800
commit909f6628edf5b5446586321c0a4df5045f2955c8 (patch)
tree6d304707aa635b3e257e5516e3eb04bef8e18b3b /genesis.c
parent2bff2ff8721d68b27720ba9a6ee8f03fab235a98 (diff)
Small cleanup of vdp_context struct layout and removal of separately allocated buffers
Diffstat (limited to 'genesis.c')
-rw-r--r--genesis.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/genesis.c b/genesis.c
index b0ff852..70664ce 100644
--- a/genesis.c
+++ b/genesis.c
@@ -1302,8 +1302,7 @@ genesis_context *alloc_init_genesis(rom_info *rom, void *main_rom, void *lock_on
gen->header.info = *rom;
set_region(gen, rom, force_region);
- gen->vdp = malloc(sizeof(vdp_context));
- init_vdp_context(gen->vdp, gen->version_reg & 0x40);
+ gen->vdp = init_vdp_context(gen->version_reg & 0x40);
gen->vdp->system = &gen->header;
gen->frame_end = vdp_cycles_to_frame_end(gen->vdp);
char * config_cycles = tern_find_path(config, "clocks\0max_cycles\0", TVAL_PTR).ptrval;