Common: namespace MemoryUtil

This commit is contained in:
Lioncash
2016-08-07 13:03:07 -04:00
parent 1ab99ee22c
commit e01c143379
15 changed files with 50 additions and 40 deletions

View File

@ -63,15 +63,15 @@ void TextureCacheBase::CheckTempSize(size_t required_size)
return;
temp_size = required_size;
FreeAlignedMemory(temp);
temp = (u8*)AllocateAlignedMemory(temp_size, 16);
Common::FreeAlignedMemory(temp);
temp = static_cast<u8*>(Common::AllocateAlignedMemory(temp_size, 16));
}
TextureCacheBase::TextureCacheBase()
{
temp_size = 2048 * 2048 * 4;
if (!temp)
temp = (u8*)AllocateAlignedMemory(temp_size, 16);
temp = static_cast<u8*>(Common::AllocateAlignedMemory(temp_size, 16));
TexDecoder_SetTexFmtOverlayOptions(g_ActiveConfig.bTexFmtOverlayEnable,
g_ActiveConfig.bTexFmtOverlayCenter);
@ -103,7 +103,7 @@ TextureCacheBase::~TextureCacheBase()
{
HiresTexture::Shutdown();
Invalidate();
FreeAlignedMemory(temp);
Common::FreeAlignedMemory(temp);
temp = nullptr;
}