[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:
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
#include <Launcher.h>
|
||||
|
||||
#include <CryCommon/CryLibrary.h>
|
||||
#include <AzCore/Math/Vector2.h>
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
|
||||
@@ -43,24 +42,6 @@ int APIENTRY WinMain([[maybe_unused]] HINSTANCE hInstance, [[maybe_unused]] HINS
|
||||
MessageBoxA(0, GetReturnCodeString(status), "Error", MB_OK | MB_DEFAULT_DESKTOP_ONLY | MB_ICONERROR);
|
||||
}
|
||||
|
||||
#if !defined(AZ_MONOLITHIC_BUILD)
|
||||
|
||||
{
|
||||
// HACK HACK HACK - is this still needed?!?!
|
||||
// CrySystem module can get loaded multiple times (even from within CrySystem itself)
|
||||
// so we will release it as many times as it takes until it actually unloads.
|
||||
void* hModule = CryLoadLibraryDefName("CrySystem");
|
||||
if (hModule)
|
||||
{
|
||||
// loop until we fail (aka unload the DLL)
|
||||
while (CryFreeLibrary(hModule))
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !defined(AZ_MONOLITHIC_BUILD)
|
||||
|
||||
// there is no way to transfer ownership of the allocator to the component application
|
||||
// without altering the app descriptor, so it must be destroyed here
|
||||
AZ::AllocatorInstance<AZ::SystemAllocator>::Destroy();
|
||||
|
||||
Reference in New Issue
Block a user