diff --git a/engine/platform/emscripten/lib_em.c b/engine/platform/emscripten/lib_em.c deleted file mode 100644 index aeb67542..00000000 --- a/engine/platform/emscripten/lib_em.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -em_lib.h - dynamic library code for iOS -Copyright (C) 2017-2018 mittorn - -This program is free software: you can redistribute it and/sor modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -*/ -#ifdef __EMSCRIPTEN__ -#include -#include "common.h" -#include "library.h" -#include "filesystem.h" -#include "server.h" - -void *EMSCRIPTEN_LoadLibrary( const char *dllname ) -{ - void *pHandle = NULL; - -#ifdef EMSCRIPTEN_LIB_FS - char path[MAX_SYSPATH], buf[MAX_VA_STRING]; - string prefix; - Q_strcpy(prefix, getenv( "LIBRARY_PREFIX" ) ); - Q_snprintf( path, MAX_SYSPATH, "%s%s%s", prefix, dllname, getenv( "LIBRARY_SUFFIX" ) ); - pHandle = dlopen( path, RTLD_LAZY ); - if( !pHandle ) - { - Q_snprintf( buf, sizeof( buf ), "Loading %s:\n", path ); - COM_PushLibraryError( buf ); - COM_PushLibraryError( dlerror() ); - } - return pHandle; -#else - // get handle of preloaded library outside fs - return EM_ASM_INT( return DLFCN.loadedLibNames[Pointer_stringify($0)], (int)dllname ); -#endif -} - -#endif // __EMSCRIPTEN__ diff --git a/engine/platform/emscripten/lib_em.h b/engine/platform/emscripten/lib_em.h deleted file mode 100644 index 30cd8661..00000000 --- a/engine/platform/emscripten/lib_em.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -em_lib.h - dynamic library code for iOS -Copyright (C) 2017-2018 mittorn - -This program is free software: you can redistribute it and/sor modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -*/ -#pragma once -#include "build.h" -#ifdef XASH_EMSCRIPTEN -#ifndef EM_LIB_H -#define EM_LIB_H - -#define Platform_POSIX_LoadLibrary( x ) EMSCRIPTEN_LoadLibrary(( x )) -#ifndef EMSCRIPTEN_LIB_FS -#define Platform_POSIX_FreeLibrary( x ) // nothing -#endif // EMSCRIPTEN_LIB_FS - -void *EMSCRIPTEN_LoadLibrary( const char *dllname ); - -#endif // EM_LIB_H -#endif // __EMSCRIPTEN__ diff --git a/engine/platform/posix/lib_posix.c b/engine/platform/posix/lib_posix.c index 5bffe8f9..23d1c3b1 100644 --- a/engine/platform/posix/lib_posix.c +++ b/engine/platform/posix/lib_posix.c @@ -25,7 +25,6 @@ GNU General Public License for more details. #include "filesystem.h" #include "server.h" #include "platform/android/lib_android.h" -#include "platform/emscripten/lib_em.h" #include "platform/apple/lib_ios.h" #ifdef XASH_DLL_LOADER // wine-based dll loader