fix linked lists in mod enabled list

This commit is contained in:
Isaac0-dev 2024-11-27 07:39:38 +10:00
parent 7d08a546e8
commit 831fdcefc9

View file

@ -6,6 +6,7 @@
#include "pc/debuglog.h"
#include "pc/loading.h"
#include "pc/fs/fmem.h"
#include "pc/pc_main.h"
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
@ -94,6 +95,7 @@ static void mods_local_store_enabled(void) {
} else {
prev->next = n;
}
prev = n;
}
}
@ -280,7 +282,7 @@ static void mods_load(struct Mods* mods, char* modsBasePath, UNUSED bool isUserM
void mods_refresh_local(void) {
LOADING_SCREEN_MUTEX(loading_screen_set_segment_text("Refreshing Mod Cache"));
mods_local_store_enabled();
if (gGameInited) { mods_local_store_enabled(); }
// figure out user path
bool hasUserPath = true;
@ -312,7 +314,7 @@ void mods_refresh_local(void) {
gLocalMods.size += mod->size;
}
mods_local_restore_enabled();
if (gGameInited) { mods_local_restore_enabled(); }
}
void mods_enable(char* relativePath) {