Merge pull request #2874 from barat/master

VideoCommon: Allow more Ram for HiresTexture if system memory is over 4GB
This commit is contained in:
Markus Wick 2015-08-20 11:08:42 +02:00
commit cb264df64c
1 changed files with 4 additions and 1 deletions

View File

@ -140,7 +140,10 @@ void HiresTexture::Prefetch()
Common::SetCurrentThreadName("Prefetcher");
size_t size_sum = 0;
size_t max_mem = MemPhysical() / 2;
size_t sys_mem = MemPhysical();
size_t recommended_min_mem = 2 * size_t(1024 * 1024 * 1024);
// keep 2GB memory for system stability if system RAM is 4GB+ - use half of memory in other cases
size_t max_mem = (sys_mem / 2 < recommended_min_mem) ? (sys_mem / 2) : (sys_mem - recommended_min_mem);
u32 starttime = Common::Timer::GetTimeMs();
for (const auto& entry : s_textureMap)
{