Declare a couple constants to help clean the code rewrites.

This commit is contained in:
unknown 2015-07-18 12:45:55 -04:00
parent 4fb6cc1f65
commit 2a45e5f792
1 changed files with 5 additions and 2 deletions

View File

@ -5372,11 +5372,14 @@ void CMipsMemoryVM::TLB_Unmaped( DWORD Vaddr, DWORD Len )
void CMipsMemoryVM::RdramChanged ( CMipsMemoryVM * _this ) void CMipsMemoryVM::RdramChanged ( CMipsMemoryVM * _this )
{ {
if (_this->m_AllocatedRdramSize == g_Settings->LoadDword(Game_RDRamSize)) const size_t new_size = g_Settings -> LoadDword(Game_RDRamSize);
const size_t old_size = _this -> m_AllocatedRdramSize;
if (old_size == new_size)
{ {
return; return;
} }
if (_this->m_AllocatedRdramSize == 0x400000) if (old_size == 0x400000)
{ {
if (VirtualAlloc(_this->m_RDRAM + 0x400000, 0x400000, MEM_COMMIT, PAGE_READWRITE)==NULL) if (VirtualAlloc(_this->m_RDRAM + 0x400000, 0x400000, MEM_COMMIT, PAGE_READWRITE)==NULL)
{ {