diff --git a/src/xrEngine/x_ray.cpp b/src/xrEngine/x_ray.cpp index 2e625314d61..1ca5abf3b1e 100644 --- a/src/xrEngine/x_ray.cpp +++ b/src/xrEngine/x_ray.cpp @@ -605,43 +605,6 @@ struct damn_keys_filter #undef dwFilterKeysStructSize #undef dwToggleKeysStructSize -// Фунция для тупых требований THQ и тупых американских пользователей -BOOL IsOutOfVirtualMemory() -{ -#define VIRT_ERROR_SIZE 256 -#define VIRT_MESSAGE_SIZE 512 - MEMORYSTATUSEX statex; - DWORD dwPageFileInMB = 0; - DWORD dwPhysMemInMB = 0; - HINSTANCE hApp = 0; - char pszError[VIRT_ERROR_SIZE]; - char pszMessage[VIRT_MESSAGE_SIZE]; - - ZeroMemory(&statex, sizeof(MEMORYSTATUSEX)); - statex.dwLength = sizeof(MEMORYSTATUSEX); - - if (!GlobalMemoryStatusEx(&statex)) - return 0; - - dwPageFileInMB = (DWORD)(statex.ullTotalPageFile / (1024 * 1024)); - dwPhysMemInMB = (DWORD)(statex.ullTotalPhys / (1024 * 1024)); - - // Довольно отфонарное условие - if ((dwPhysMemInMB > 500) && ((dwPageFileInMB + dwPhysMemInMB) > 2500)) - return 0; - - hApp = GetModuleHandle(NULL); - - if (!LoadString(hApp, RC_VIRT_MEM_ERROR, pszError, VIRT_ERROR_SIZE)) - return 0; - - if (!LoadString(hApp, RC_VIRT_MEM_TEXT, pszMessage, VIRT_MESSAGE_SIZE)) - return 0; - - MessageBox(NULL, pszMessage, pszError, MB_OK | MB_ICONHAND); - return 1; -} - #include "xr_ioc_cmd.h" //typedef void DUMMY_STUFF (const void*,const u32&,void*); @@ -726,10 +689,6 @@ int APIENTRY WinMain_impl(HINSTANCE hInstance, // foo(); #ifndef DEDICATED_SERVER - - // Check for virtual memory - if ((strstr(lpCmdLine, "--skipmemcheck") == NULL) && IsOutOfVirtualMemory()) - return 0; // Check for another instance #ifdef NO_MULTI_INSTANCES #define STALKER_PRESENCE_MUTEX "Local\\STALKER-COP"