fastman92

StreamingLimits::SetMemoryAvailable

Feb 8th, 2015
233
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // Sets a memory available
  2.     void StreamingLimits::SetMemoryAvailable(unsigned __int32 memoryAvailableInBytes)
  3.     {
  4.         // CPatch::EnableDebugMode();
  5.  
  6.         if(CPatch::IsDebugModeActive())
  7.             memoryAvailableInBytes = 52428800;
  8.    
  9.         CPatch::PatchDWORD(0x5B8E64 + 6, memoryAvailableInBytes);
  10.  
  11.         CPatch::DisableDebugMode();
  12.  
  13.         CGenericLogStorage::SaveFormattedTextLn(
  14.             "Streaming memory available limit set to %lu bytes (%d MB)",
  15.             memoryAvailableInBytes,
  16.             memoryAvailableInBytes / (1024 * 1024)
  17.             );
  18.         CGenericLogStorage::WriteLineSeparator();
  19.     }
RAW Paste Data