Integrating github/staging through commit 5f214be
This commit is contained in:
@@ -85,7 +85,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Save",IDB_CONFIRM_SAVE,4,96,68,20
|
||||
PUSHBUTTON "Cancel",IDB_DONT_SAVE,206,96,68,20
|
||||
LTEXT "Lumberyard has encountered an error and needs to close.\n\nA backup has been saved to the '_savebackup' subfolder.\n\nIf you are unable to save your file, you can recover by copying the contents of the _savebackup folder over the broken files.",IDC_STATIC,60,8,210,61
|
||||
LTEXT "Open 3D Engine has encountered an error and needs to close.\n\nA backup has been saved to the '_savebackup' subfolder.\n\nIf you are unable to save your file, you can recover by copying the contents of the _savebackup folder over the broken files.",IDC_STATIC,60,8,210,61
|
||||
LTEXT "Attempt save?",IDC_STATIC,60,72,180,21
|
||||
CONTROL 128,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE,8,8,48,40
|
||||
END
|
||||
|
||||
@@ -4871,7 +4871,9 @@ static void* tmalloc_small(mstate m, size_t nb)
|
||||
}
|
||||
|
||||
CORRUPTION_ERROR_ACTION(m);
|
||||
#if PROCEED_ON_ERROR
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* --------------------------- realloc support --------------------------- */
|
||||
@@ -4930,7 +4932,9 @@ static void* internal_realloc(mstate m, void* oldmem, size_t bytes)
|
||||
{
|
||||
USAGE_ERROR_ACTION(m, oldmem);
|
||||
POSTACTION(m);
|
||||
#if PROCEED_ON_ERROR
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#if DEBUG
|
||||
if (newp != 0)
|
||||
@@ -5884,7 +5888,9 @@ void* mspace_malloc(mspace msp, size_t bytes)
|
||||
if (!ok_magic(ms))
|
||||
{
|
||||
USAGE_ERROR_ACTION(ms, ms);
|
||||
#if PROCEED_ON_ERROR
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
if (!PREACTION(ms))
|
||||
{
|
||||
@@ -6150,7 +6156,9 @@ void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size)
|
||||
if (!ok_magic(ms))
|
||||
{
|
||||
USAGE_ERROR_ACTION(ms, ms);
|
||||
#if PROCEED_ON_ERROR
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
if (n_elements != 0)
|
||||
{
|
||||
@@ -6193,7 +6201,9 @@ void* mspace_realloc(mspace msp, void* oldmem, size_t bytes)
|
||||
if (!ok_magic(ms))
|
||||
{
|
||||
USAGE_ERROR_ACTION(ms, ms);
|
||||
#if PROCEED_ON_ERROR
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
return internal_realloc(ms, oldmem, bytes);
|
||||
}
|
||||
@@ -6205,7 +6215,9 @@ void* mspace_memalign(mspace msp, size_t alignment, size_t bytes)
|
||||
if (!ok_magic(ms))
|
||||
{
|
||||
USAGE_ERROR_ACTION(ms, ms);
|
||||
#if PROCEED_ON_ERROR
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
return internal_memalign(ms, alignment, bytes);
|
||||
}
|
||||
@@ -6218,7 +6230,9 @@ void** mspace_independent_calloc(mspace msp, size_t n_elements,
|
||||
if (!ok_magic(ms))
|
||||
{
|
||||
USAGE_ERROR_ACTION(ms, ms);
|
||||
#if PROCEED_ON_ERROR
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
return ialloc(ms, n_elements, &sz, 3, chunks);
|
||||
}
|
||||
@@ -6230,7 +6244,9 @@ void** mspace_independent_comalloc(mspace msp, size_t n_elements,
|
||||
if (!ok_magic(ms))
|
||||
{
|
||||
USAGE_ERROR_ACTION(ms, ms);
|
||||
#if PROCEED_ON_ERROR
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
return ialloc(ms, n_elements, sizes, 0, chunks);
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ void IDebugCallStack::FatalError(const char* description)
|
||||
bShowDebugScreen = bShowDebugScreen && gEnv->mMainThreadId == CryGetCurrentThreadId();
|
||||
if (bShowDebugScreen)
|
||||
{
|
||||
EBUS_EVENT(AZ::NativeUI::NativeUIRequestBus, DisplayOkDialog, "Lumberyard Fatal Error", description, false);
|
||||
EBUS_EVENT(AZ::NativeUI::NativeUIRequestBus, DisplayOkDialog, "Open 3D Engine Fatal Error", description, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -98,14 +98,18 @@ bool CCryMemoryManager::GetProcessMemInfo(SProcessMemInfo& minfo)
|
||||
}
|
||||
return false;
|
||||
|
||||
#else
|
||||
|
||||
#define AZ_RESTRICTED_SECTION_IMPLEMENTED
|
||||
#elif defined(AZ_RESTRICTED_PLATFORM)
|
||||
#define AZ_RESTRICTED_SECTION MEMORYMANAGER_CPP_SECTION_1
|
||||
#include AZ_RESTRICTED_FILE(MemoryManager_cpp)
|
||||
#if defined(AZ_RESTRICTED_PLATFORM)
|
||||
#define AZ_RESTRICTED_SECTION MEMORYMANAGER_CPP_SECTION_1
|
||||
#include AZ_RESTRICTED_FILE(MemoryManager_cpp)
|
||||
#endif
|
||||
|
||||
bool retVal = true;
|
||||
|
||||
#if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED)
|
||||
#undef AZ_RESTRICTED_SECTION_IMPLEMENTED
|
||||
#undef AZ_RESTRICTED_SECTION_IMPLEMENTED
|
||||
#elif defined(LINUX)
|
||||
|
||||
MEMORYSTATUS MemoryStatus;
|
||||
@@ -143,11 +147,15 @@ bool CCryMemoryManager::GetProcessMemInfo(SProcessMemInfo& minfo)
|
||||
return false;
|
||||
}
|
||||
minfo.WorkingSetSize = kTaskInfo.resident_size;
|
||||
|
||||
#else
|
||||
return false;
|
||||
|
||||
retVal = false;
|
||||
|
||||
#endif
|
||||
|
||||
return true;
|
||||
return retVal;
|
||||
#endif
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1451,20 +1451,12 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode)
|
||||
//bool bPause = false;
|
||||
bool bNoUpdate = false;
|
||||
#ifndef EXCLUDE_UPDATE_ON_CONSOLE
|
||||
//check what is the current process
|
||||
IProcess* pProcess = GetIProcess();
|
||||
if (!pProcess)
|
||||
{
|
||||
return (true); //should never happen
|
||||
}
|
||||
if (m_sysNoUpdate && m_sysNoUpdate->GetIVal())
|
||||
{
|
||||
bNoUpdate = true;
|
||||
updateFlags = ESYSUPDATE_IGNORE_PHYSICS;
|
||||
}
|
||||
|
||||
//if ((pProcess->GetFlags() & PROC_MENU) || (m_sysNoUpdate && m_sysNoUpdate->GetIVal()))
|
||||
// bPause = true;
|
||||
m_bNoUpdate = bNoUpdate;
|
||||
#endif //EXCLUDE_UPDATE_ON_CONSOLE
|
||||
|
||||
@@ -1537,7 +1529,7 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode)
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if (m_env.pRenderer->GetIStereoRenderer()->IsRenderingToHMD())
|
||||
if (m_env.pRenderer && m_env.pRenderer->GetIStereoRenderer()->IsRenderingToHMD())
|
||||
{
|
||||
EBUS_EVENT(AZ::VR::HMDDeviceRequestBus, UpdateInternalState);
|
||||
}
|
||||
@@ -2860,8 +2852,6 @@ bool CSystem::HandleMessage([[maybe_unused]] HWND hWnd, UINT uMsg, WPARAM wParam
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -248,7 +248,7 @@ CUNIXConsole* pUnixConsole;
|
||||
#define LOCALIZATION_TRANSLATIONS_LIST_FILE_NAME "Libs/Localization/localization.xml"
|
||||
|
||||
#define LOAD_LEGACY_RENDERER_FOR_EDITOR true // If you set this to false you must for now also set 'ed_useAtomNativeViewport' to true (see /Code/Sandbox/Editor/ViewManager.cpp)
|
||||
#define LOAD_LEGACY_RENDERER_FOR_LAUNCHER true
|
||||
#define LOAD_LEGACY_RENDERER_FOR_LAUNCHER false
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Where possible, these are defaults used to initialize cvars
|
||||
@@ -1256,7 +1256,7 @@ bool CSystem::OpenRenderLibrary(int type, const SSystemInitParams& initParams)
|
||||
if (allowPrompts)
|
||||
{
|
||||
AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Asking user if they wish to continue...");
|
||||
const int mbRes = MessageBoxW(0, GetErrorStringUnsupportedGPU(gpuName, gpuVendorId, gpuDeviceId).c_str(), L"Lumberyard", MB_ICONWARNING | MB_OKCANCEL | MB_DEFBUTTON2 | MB_DEFAULT_DESKTOP_ONLY);
|
||||
const int mbRes = MessageBoxW(0, GetErrorStringUnsupportedGPU(gpuName, gpuVendorId, gpuDeviceId).c_str(), L"Open 3D Engine", MB_ICONWARNING | MB_OKCANCEL | MB_DEFBUTTON2 | MB_DEFAULT_DESKTOP_ONLY);
|
||||
if (mbRes == IDCANCEL)
|
||||
{
|
||||
AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "User chose to cancel startup due to unsupported GPU.");
|
||||
@@ -2093,7 +2093,7 @@ static bool CheckCPURequirements([[maybe_unused]] CCpuFeatures* pCpu, [[maybe_un
|
||||
if (allowPrompts)
|
||||
{
|
||||
AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Asking user if they wish to continue...");
|
||||
const int mbRes = MessageBoxW(0, GetErrorStringUnsupportedCPU().c_str(), L"Lumberyard", MB_ICONWARNING | MB_OKCANCEL | MB_DEFBUTTON2 | MB_DEFAULT_DESKTOP_ONLY);
|
||||
const int mbRes = MessageBoxW(0, GetErrorStringUnsupportedCPU().c_str(), L"Open 3D Engine", MB_ICONWARNING | MB_OKCANCEL | MB_DEFBUTTON2 | MB_DEFAULT_DESKTOP_ONLY);
|
||||
if (mbRes == IDCANCEL)
|
||||
{
|
||||
AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "User chose to cancel startup.");
|
||||
@@ -2305,7 +2305,7 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
if (!bIsWindowsXPorLater)
|
||||
{
|
||||
AZ_Error(AZ_TRACE_SYSTEM_WINDOW, false, "Lumberyard requires an OS version of Windows XP or later.");
|
||||
AZ_Error(AZ_TRACE_SYSTEM_WINDOW, false, "Open 3D Engine requires an OS version of Windows XP or later.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2420,7 +2420,7 @@ AZ_POP_DISABLE_WARNING
|
||||
azstrcpy(
|
||||
headerString,
|
||||
AZ_ARRAY_SIZE(headerString),
|
||||
"Lumberyard - "
|
||||
"Open 3D Engine - "
|
||||
#if defined(LINUX)
|
||||
"Linux "
|
||||
#elif defined(MAC)
|
||||
|
||||
@@ -626,7 +626,7 @@ void CSystem::RenderStats()
|
||||
float nTextPosX = 101 - 20, nTextPosY = -2, nTextStepY = 3;
|
||||
m_env.p3DEngine->DisplayInfo(nTextPosX, nTextPosY, nTextStepY, iDisplayInfo != 1);
|
||||
|
||||
// Dump Lumberyard CPU and GPU memory statistics to screen
|
||||
// Dump Open 3D Engine CPU and GPU memory statistics to screen
|
||||
m_env.p3DEngine->DisplayMemoryStatistics();
|
||||
|
||||
#if defined(ENABLE_LW_PROFILERS)
|
||||
|
||||
@@ -1091,7 +1091,7 @@ void CSystem::FatalError(const char* format, ...)
|
||||
{
|
||||
::ShowWindow((HWND)gEnv->pRenderer->GetHWND(), SW_MINIMIZE);
|
||||
}
|
||||
::MessageBox(NULL, szBuffer, "Lumberyard Error", MB_OK | MB_ICONERROR | MB_SYSTEMMODAL);
|
||||
::MessageBox(NULL, szBuffer, "Open 3D Engine Error", MB_OK | MB_ICONERROR | MB_SYSTEMMODAL);
|
||||
}
|
||||
|
||||
// Dump callstack.
|
||||
|
||||
@@ -193,34 +193,12 @@ bool IsOptionalReadXML(const SParseParams& parseParams, XmlNodeRef& definition)
|
||||
return optional;
|
||||
}
|
||||
|
||||
bool CheckEnum([[maybe_unused]] const SParseParams& parseParams, const char* name, XmlNodeRef& definition, XmlNodeRef& data)
|
||||
bool CheckEnum([[maybe_unused]] const SParseParams& parseParams, [[maybe_unused]] const char* name, XmlNodeRef& definition, [[maybe_unused]] XmlNodeRef& data)
|
||||
{
|
||||
if (XmlNodeRef enumNode = definition->findChild("Enum"))
|
||||
{
|
||||
// If strict mode is off, then no need to check the enum value
|
||||
return true;
|
||||
|
||||
// if restrictive attribute set to false, check always succeeds
|
||||
if (enumNode->haveAttr("restrictive"))
|
||||
{
|
||||
bool res = true;
|
||||
enumNode->getAttr("restrictive", res);
|
||||
if (!res)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// else check enum values
|
||||
const char* val = data->getAttr(name);
|
||||
for (int i = 0; i < enumNode->getChildCount(); ++i)
|
||||
{
|
||||
if (0 == strcmp(enumNode->getChild(i)->getContent(), val))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user