mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 16:51:08 +00:00
make sure files loaded by the progs engine can be freed safely
This commit is contained in:
parent
6203d450eb
commit
1d96156936
1 changed files with 7 additions and 0 deletions
|
@ -403,12 +403,19 @@ menu_free_progs_mem (progs_t *pr, void *mem)
|
||||||
free (mem);
|
free (mem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *
|
||||||
|
menu_load_file (progs_t *pr, const char *path)
|
||||||
|
{
|
||||||
|
return COM_LoadFile (path, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Menu_Init (void)
|
Menu_Init (void)
|
||||||
{
|
{
|
||||||
menu_pr_state.progs_name = "menu.dat";
|
menu_pr_state.progs_name = "menu.dat";
|
||||||
menu_pr_state.allocate_progs_mem = menu_allocate_progs_mem;
|
menu_pr_state.allocate_progs_mem = menu_allocate_progs_mem;
|
||||||
menu_pr_state.free_progs_mem = menu_free_progs_mem;
|
menu_pr_state.free_progs_mem = menu_free_progs_mem;
|
||||||
|
menu_pr_state.load_file = menu_load_file;
|
||||||
|
|
||||||
PR_Resources_Init (&menu_pr_state);
|
PR_Resources_Init (&menu_pr_state);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue