Skip to content

Commit

Permalink
free dqbb RAM at shutdown
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/vice-emu/code/trunk@45326 379a1393-f5fb-40a0-bcee-ef074d9b53f7
  • Loading branch information
mrdudz committed Aug 31, 2024
1 parent c43678c commit efdd4f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions vice/src/c64/cart/c64carthooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1994,6 +1994,7 @@ void cartridge_shutdown(void)

/* "Main Slot" */
/* "Slot 1" */
dqbb_shutdown();
/* "IO Slot" */
}

Expand Down
7 changes: 7 additions & 0 deletions vice/src/c64/cart/dqbb.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,13 @@ void dqbb_powerup(void)
}
}

void dqbb_shutdown(void)
{
if (dqbb_ram) {
lib_free(dqbb_ram);
}
}

static int dqbb_activate(void)
{
DBG(("dqbb_activate"));
Expand Down
2 changes: 2 additions & 0 deletions vice/src/c64/cart/dqbb.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ int dqbb_cart_enabled(void);
int dqbb_resources_init(void);
void dqbb_resources_shutdown(void);
int dqbb_cmdline_options_init(void);

void dqbb_reset(void);
void dqbb_detach(void);
void dqbb_init_config(void);
Expand All @@ -65,6 +66,7 @@ int dqbb_bin_attach(const char *filename, uint8_t *rawcart);
int dqbb_bin_save(const char *filename);
int dqbb_flush_image(void);
void dqbb_powerup(void);
void dqbb_shutdown(void);

struct snapshot_s;

Expand Down

0 comments on commit efdd4f3

Please sign in to comment.