-prevent export of ModuleInitISystem and ModuleShutdownISystem Signed-off-by: Michael Pollind <mpollind@gmail.com>
This commit is contained in:
@@ -173,8 +173,6 @@ void CryEngineSignalHandler(int signal)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#if defined(WIN32) || defined(LINUX) || defined(APPLE)
|
||||
# define DLL_MODULE_INIT_ISYSTEM "ModuleInitISystem"
|
||||
# define DLL_MODULE_SHUTDOWN_ISYSTEM "ModuleShutdownISystem"
|
||||
# define DLL_INITFUNC_RENDERER "PackageRenderConstructor"
|
||||
# define DLL_INITFUNC_SOUND "CreateSoundSystem"
|
||||
# define DLL_INITFUNC_FONT "CreateCryFontInterface"
|
||||
@@ -188,8 +186,6 @@ void CryEngineSignalHandler(int signal)
|
||||
#if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED)
|
||||
#undef AZ_RESTRICTED_SECTION_IMPLEMENTED
|
||||
#else
|
||||
# define DLL_MODULE_INIT_ISYSTEM (LPCSTR)2
|
||||
# define DLL_MODULE_SHUTDOWN_ISYSTEM (LPCSTR)3
|
||||
# define DLL_INITFUNC_RENDERER (LPCSTR)1
|
||||
# define DLL_INITFUNC_RENDERER (LPCSTR)1
|
||||
# define DLL_INITFUNC_SOUND (LPCSTR)1
|
||||
@@ -445,18 +441,6 @@ AZStd::unique_ptr<AZ::DynamicModuleHandle> CSystem::LoadDLL(const char* dllName)
|
||||
return handle;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// After loading DLL initialize it by calling ModuleInitISystem
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
AZStd::string moduleName = PathUtil::GetFileName(dllName);
|
||||
|
||||
typedef void*(*PtrFunc_ModuleInitISystem)(ISystem* pSystem, const char* moduleName);
|
||||
PtrFunc_ModuleInitISystem pfnModuleInitISystem = handle->GetFunction<PtrFunc_ModuleInitISystem>(DLL_MODULE_INIT_ISYSTEM);
|
||||
if (pfnModuleInitISystem)
|
||||
{
|
||||
pfnModuleInitISystem(this, moduleName.c_str());
|
||||
}
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
@@ -497,13 +481,6 @@ void CSystem::ShutdownModuleLibraries()
|
||||
#if !defined(AZ_MONOLITHIC_BUILD)
|
||||
for (auto iterator = m_moduleDLLHandles.begin(); iterator != m_moduleDLLHandles.end(); ++iterator)
|
||||
{
|
||||
typedef void*( * PtrFunc_ModuleShutdownISystem )(ISystem* pSystem);
|
||||
|
||||
PtrFunc_ModuleShutdownISystem pfnModuleShutdownISystem = iterator->second->GetFunction<PtrFunc_ModuleShutdownISystem>(DLL_MODULE_SHUTDOWN_ISYSTEM);
|
||||
if (pfnModuleShutdownISystem)
|
||||
{
|
||||
pfnModuleShutdownISystem(this);
|
||||
}
|
||||
if (iterator->second->IsLoaded())
|
||||
{
|
||||
iterator->second->Unload();
|
||||
|
||||
Reference in New Issue
Block a user