#include <modules.h>
// === PROTOTYPES ===
+ int Modules_LoadBuiltins();
int Module_LoadMem(void *Buffer, Uint Length, char *ArgString);
int Module_LoadFile(char *Path, char *ArgString);
int Module_int_ResolveDeps(tModule *Info);
gKernelModules[i].Name,
gKernelModules[i].Version>>8, gKernelModules[i].Version & 0xFF
);
- gKernelModules[i].Init(NULL);
+ if( gKernelModules[i].Init(NULL) == 0 ) {
+ Log("Loading Failed, all modules that depend on this will also fail");
+ baIsLoaded[i] = -1;
+ }
// Mark as loaded
- baIsLoaded[i] = 1;
+ else
+ baIsLoaded[i] = 1;
numToInit --;
}
}
{
char path[VFS_MEMPATH_SIZE];
- VFS_GetMemPath(Buffer, Length, path);
+ VFS_GetMemPath(path, Buffer, Length);
return Module_LoadFile( path, ArgString );
}