Fix broken errors, log ISO path

This commit is contained in:
Margen67 2023-06-28 00:20:53 -07:00
parent 921923472b
commit 71b8c2357e
2 changed files with 5 additions and 3 deletions

View File

@ -299,11 +299,11 @@ X_STATUS Emulator::MountPath(const std::filesystem::path& path,
const std::string_view mount_path) { const std::string_view mount_path) {
auto device = CreateVfsDeviceBasedOnPath(path, mount_path); auto device = CreateVfsDeviceBasedOnPath(path, mount_path);
if (!device->Initialize()) { if (!device->Initialize()) {
xe::FatalError("Unable to mount {}; file not found or corrupt."); xe::FatalError(fmt::format("Unable to mount {}; file corrupt or not found.", xe::path_to_utf8(path)));
return X_STATUS_NO_SUCH_FILE; return X_STATUS_NO_SUCH_FILE;
} }
if (!file_system_->RegisterDevice(std::move(device))) { if (!file_system_->RegisterDevice(std::move(device))) {
xe::FatalError("Unable to register {}."); xe::FatalError(fmt::format("Unable to register {} to {}.", xe::path_to_utf8(path), xe::path_to_utf8(mount_path)));
return X_STATUS_NO_SUCH_FILE; return X_STATUS_NO_SUCH_FILE;
} }

View File

@ -30,8 +30,10 @@ DiscImageDevice::~DiscImageDevice() = default;
bool DiscImageDevice::Initialize() { bool DiscImageDevice::Initialize() {
mmap_ = MappedMemory::Open(host_path_, MappedMemory::Mode::kRead); mmap_ = MappedMemory::Open(host_path_, MappedMemory::Mode::kRead);
if (!mmap_) { if (!mmap_) {
XELOGE("Disc image could not be mapped"); XELOGE("Disc image {} could not be mapped", xe::path_to_utf8(host_path_));
return false; return false;
} else {
XELOGFS("DiscImageDevice::Initialize({})", xe::path_to_utf8(host_path_));
} }
ParseState state = {0}; ParseState state = {0};