Implement Emulator::GetFakeCat()

I still have nightmares about that cat.
This commit is contained in:
Eladash 2021-09-16 02:34:20 +03:00 committed by Megamouse
parent 73bdf7481e
commit 1f3b1e1c99
5 changed files with 24 additions and 4 deletions

View file

@ -1906,4 +1906,20 @@ bool Emulator::IsPathInsideDir(std::string_view path, std::string_view dir) cons
return (GetCallbacks().resolve_path(path) + '/').starts_with(GetCallbacks().resolve_path(dir) + '/');
};
const std::string& Emulator::GetFakeCat() const
{
if (m_cat == "DG")
{
const std::string mount_point = vfs::get("/dev_bdvd");
if (mount_point.empty() || !IsPathInsideDir(m_path, mount_point))
{
static const std::string s_hg = "HG";
return s_hg;
}
}
return m_cat;
};
Emulator Emu;