Support mapping memory to device files

This commit is contained in:
Stephen Miller 2025-04-21 15:21:12 -05:00
parent 3dac1a2c6a
commit 8b5b34fdba
4 changed files with 18 additions and 0 deletions

View file

@ -245,6 +245,12 @@ void Emulator::Run(const std::filesystem::path& file, const std::vector<std::str
}
VideoCore::SetOutputDir(mount_captures_dir, id);
const auto& devices_dir = Common::FS::GetUserPath(Common::FS::PathType::DevicesDir);
if (!std::filesystem::exists(devices_dir)) {
std::filesystem::create_directory(devices_dir);
}
mnt->Mount(devices_dir, "/dev");
// Initialize kernel and library facilities.
Libraries::InitHLELibs(&linker->GetHLESymbols());