Feature Request #206 Command line switch: -memclear #

This commit is contained in:
michaelangel007
2014-07-17 20:18:59 -07:00
parent 9ded7f0926
commit f4b09e1f8f
4 changed files with 26 additions and 6 deletions
+9 -3
View File
@@ -1391,9 +1391,15 @@ void MemReset ()
// OR
// F2, Ctrl-F2, F7, HGR
DWORD clock = getRandomTime();
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>( clock % NUM_MIP );
if( g_eMemoryInitPattern == MIP_ZERO )
g_eMemoryInitPattern = MIP_FF_FF_00_00;
if ((g_nMemoryClearType >= 0) && (g_nMemoryClearType != MIP_RANDOM))
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>(g_nMemoryClearType);
else // random
{
g_eMemoryInitPattern = static_cast<MemoryInitPattern_e>( clock % NUM_MIP );
if (g_eMemoryInitPattern == MIP_RANDOM) // Twice Lucky! Force a choice.
g_eMemoryInitPattern = MIP_FF_FF_00_00;
}
switch( g_eMemoryInitPattern )
{