Fix Create PPU Cache

This commit is contained in:
Eladash 2023-06-15 21:59:19 +03:00 committed by Ivan
parent 37bc73865d
commit 073b723c09
4 changed files with 24 additions and 16 deletions

View file

@ -12,15 +12,15 @@ namespace rpcs3::cache
{
std::string get_ppu_cache()
{
auto& _main = g_fxo->get<main_ppu_module>();
const auto _main = g_fxo->try_get<main_ppu_module>();
if (!g_fxo->is_init<main_ppu_module>() || _main.cache.empty())
if (!_main || _main->cache.empty())
{
ppu_log.error("PPU Cache location not initialized.");
return {};
}
return _main.cache;
return _main->cache;
}
void limit_cache_size()