[Win,hog] Load the newly created d3-win.hog after all other hog files from the original game.

The last library opened with cf_OpenLibrary() will be the first to be searched for DLLs. This way we make sure to load our x64 DLLs before the x86 versions from the original game data.
This commit is contained in:
Thomas Roß 2024-05-15 20:13:28 +02:00
parent 1bf84737e5
commit 435b1f48bb
2 changed files with 8 additions and 1 deletions

View File

@ -427,7 +427,7 @@
bool Show_osiris_debug = false; bool Show_osiris_debug = false;
#define MAX_LOADED_MODULES 64 // maximum number of dlls that can be loaded at a time #define MAX_LOADED_MODULES 96 // maximum number of dlls that can be loaded at a time
#define OSIMF_INUSE 0x1 // slot in use #define OSIMF_INUSE 0x1 // slot in use
#define OSIMF_LEVEL 0x2 // level module #define OSIMF_LEVEL 0x2 // level module

View File

@ -1533,6 +1533,13 @@ void InitIOSystems(bool editor) {
ddio_MakePath(fullname, LocalD3Dir, "extra13.hog", NULL); ddio_MakePath(fullname, LocalD3Dir, "extra13.hog", NULL);
extra13_hid = cf_OpenLibrary(fullname); extra13_hid = cf_OpenLibrary(fullname);
// last library opened is the first to be searched for DLLs, so put this one
// at the end to find our newly build script DLLs first
#ifdef _WIN32
ddio_MakePath(fullname, LocalD3Dir, "d3-win.hog", NULL);
sys_hid = cf_OpenLibrary(fullname);
#endif
// Check to see if there is a -mission command line option // Check to see if there is a -mission command line option
// if there is, attempt to open that hog/mn3 so it can override such // if there is, attempt to open that hog/mn3 so it can override such
// things as the mainmenu movie, or loading screen // things as the mainmenu movie, or loading screen