mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Some MorphOS plugin stuff.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1190 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e8e35a4a19
commit
091aa86c94
1 changed files with 11 additions and 0 deletions
|
@ -130,12 +130,22 @@ void Sys_UnloadDLL(void *handle)
|
|||
}
|
||||
}
|
||||
#else
|
||||
#ifdef __MORPHOS__
|
||||
#include <proto/dynload.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
void *Sys_LoadDLL(const char *name, void **vmMain, int (EXPORT_FN *syscall)(int arg, ... ))
|
||||
{
|
||||
void (*dllEntry)(int (EXPORT_FN *syscall)(int arg, ... ));
|
||||
char dllname[MAX_OSPATH];
|
||||
void *hVM;
|
||||
|
||||
#ifdef __MORPHOS__
|
||||
if (DynLoadBase == 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
sprintf(dllname, "%sx86.so", name);
|
||||
|
||||
|
@ -151,6 +161,7 @@ void *Sys_LoadDLL(const char *name, void **vmMain, int (EXPORT_FN *syscall)(int
|
|||
if (!gpath)
|
||||
return NULL; // couldn't find one anywhere
|
||||
_snprintf (name, sizeof(name), "%s/%s", gpath, dllname);
|
||||
|
||||
hVM = dlopen (name, RTLD_NOW);
|
||||
if (hVM)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue