[development] removed CryLibrary (#5474)

* [redcode_crylibrary] replaced CrySystem loading in launcher and editor with new custom wrapper that uses AZ::DynamicModuleHandle

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>

* [redcode_crylibrary] removed all remaining references to CryLibrary

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>

* [redcode_crylibrary] migrate CrySystem loading to use AZ::DynamicModuleHandle directly instead

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>

* [redcode_crylibrary] clean up of CrySystemModuleHandle and old CrySystem module [un]init functions

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>

* [redcode_crylibrary] added trailing newline to DllMain.cpp in CrySystem

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
Scott Romero
2021-11-10 08:43:13 -08:00
committed by GitHub
parent 8b5fe4a015
commit ab37eb138c
17 changed files with 24 additions and 527 deletions
-34
View File
@@ -14,7 +14,6 @@
#include <IRenderer.h>
#include <IMovieSystem.h>
#include <ILog.h>
#include <CryLibrary.h>
#include <AzCore/Debug/StackTracer.h>
#include <AzCore/IO/SystemFile.h> // for AZ_MAX_PATH_LEN
#include <AzCore/std/allocator_stack.h>
@@ -70,39 +69,6 @@ const char* g_szModuleGroups[][2] = {
{"CrySystem.dll", g_szGroupCore}
};
//////////////////////////////////////////////////////////////////////////
void CSystem::SetAffinity()
{
// the following code is only for Windows
#ifdef WIN32
// set the process affinity
ICVar* pcvAffinityMask = GetIConsole()->GetCVar("sys_affinity");
if (!pcvAffinityMask)
{
pcvAffinityMask = REGISTER_INT("sys_affinity", 0, VF_NULL, "");
}
if (pcvAffinityMask)
{
unsigned nAffinity = pcvAffinityMask->GetIVal();
if (nAffinity)
{
typedef BOOL (WINAPI * FnSetProcessAffinityMask)(IN HANDLE hProcess, IN DWORD_PTR dwProcessAffinityMask);
HMODULE hKernel = CryLoadLibrary ("kernel32.dll");
if (hKernel)
{
FnSetProcessAffinityMask SetProcessAffinityMask = (FnSetProcessAffinityMask)GetProcAddress(hKernel, "SetProcessAffinityMask");
if (SetProcessAffinityMask && !SetProcessAffinityMask(GetCurrentProcess(), nAffinity))
{
GetILog()->LogError("Error: Cannot set affinity mask %d, error code %d", nAffinity, GetLastError());
}
FreeLibrary (hKernel);
}
}
}
#endif
}
#if defined(WIN32)
#pragma pack(push,1)
struct PEHeader_DLL