Remove more unused things from CryCommon and CrySystem. (#709)

Lots of unrelated removals, I basically tried to remove everything exposed via gEnv that isn't used anymore, and following the threads found a few other things to remove also.
This commit is contained in:
bosnichd
2021-05-12 08:30:15 -06:00
committed by GitHub
parent f9fb61cc5d
commit 7cec2d8b07
198 changed files with 29 additions and 28558 deletions
-36
View File
@@ -14,7 +14,6 @@
#include "CrySystem_precompiled.h"
#include "System.h"
#include <AZCrySystemInitLogSink.h>
#include "DebugCallStack.h"
#if defined(AZ_RESTRICTED_PLATFORM)
#undef AZ_RESTRICTED_SECTION
@@ -72,10 +71,6 @@ public:
{
switch (event)
{
case ESYSTEM_EVENT_LEVEL_UNLOAD:
gEnv->pSystem->SetThreadState(ESubsys_Physics, false);
break;
case ESYSTEM_EVENT_LEVEL_LOAD_START:
case ESYSTEM_EVENT_LEVEL_LOAD_END:
{
@@ -87,7 +82,6 @@ public:
{
CryCleanup();
STLALLOCATOR_CLEANUP;
gEnv->pSystem->SetThreadState(ESubsys_Physics, true);
break;
}
}
@@ -135,21 +129,6 @@ CRYSYSTEM_API ISystem* CreateSystemInterface(const SSystemInitParams& startupPar
startupParams.pUserCallback->OnSystemConnect(pSystem);
}
// Environment Variable to signal we don't want to override our exception handler - our crash report system will set this
auto envVar = AZ::Environment::FindVariable<bool>("ExceptionHandlerIsSet");
bool handlerIsSet = (envVar && *envVar);
if (!startupParams.bMinimal && !handlerIsSet) // in minimal mode, we want to crash when we crash!
{
#if defined(WIN32)
// Install exception handler in Release modes.
((DebugCallStack*)IDebugCallStack::instance())->installErrorHandler(pSystem);
#elif defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION DLLMAIN_CPP_SECTION_3
#include AZ_RESTRICTED_FILE(DllMain_cpp)
#endif
}
bool retVal = false;
{
AZ::Debug::StartupLogSinkReporter<AZ::Debug::CrySystemInitLogSink> initLogSink;
@@ -171,20 +150,5 @@ CRYSYSTEM_API ISystem* CreateSystemInterface(const SSystemInitParams& startupPar
return pSystem;
}
CRYSYSTEM_API void WINAPI CryInstallUnhandledExceptionHandler()
{
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION DLLMAIN_CPP_SECTION_4
#include AZ_RESTRICTED_FILE(DllMain_cpp)
#endif
}
#if defined(ENABLE_PROFILING_CODE) && !defined(LINUX) && !defined(APPLE)
CRYSYSTEM_API void CryInstallPostExceptionHandler(void (* PostExceptionHandlerCallback)())
{
return IDebugCallStack::instance()->FileCreationCallback(PostExceptionHandlerCallback);
}
#endif
};