This commit is contained in:
Nicholas Huelin 2025-08-24 23:45:49 +00:00 committed by GitHub
commit caff984dc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View file

@ -811,7 +811,11 @@ void EmulatorWindow::FileDrop(const std::filesystem::path& filename) {
} }
auto result = emulator_->LaunchPath(filename); auto result = emulator_->LaunchPath(filename);
if (XFAILED(result)) { if (XFAILED(result)) {
// TODO: Display a message box. xe::ui::ImGuiDialog::ShowMessageBox(
imgui_drawer_.get(), "Error: Failed to Launch",
fmt::format("Failed to launch target {}",
xe::path_to_utf8(filename.filename()) +
"; file format is unrecognized or corrupted."));
XELOGE("Failed to launch target: {:08X}", result); XELOGE("Failed to launch target: {:08X}", result);
} }
} }
@ -843,7 +847,11 @@ void EmulatorWindow::FileOpen() {
auto abs_path = std::filesystem::absolute(path); auto abs_path = std::filesystem::absolute(path);
auto result = emulator_->LaunchPath(abs_path); auto result = emulator_->LaunchPath(abs_path);
if (XFAILED(result)) { if (XFAILED(result)) {
// TODO: Display a message box. xe::ui::ImGuiDialog::ShowMessageBox(
imgui_drawer_.get(), "Error: Failed to Launch",
fmt::format("Failed to launch target {}",
xe::path_to_utf8(abs_path.filename()) +
"; file format is unrecognized or corrupted."));
XELOGE("Failed to launch target: {:08X}", result); XELOGE("Failed to launch target: {:08X}", result);
} }
} }

View file

@ -332,11 +332,11 @@ X_STATUS Emulator::LaunchDiscImage(const std::filesystem::path& path) {
// Register the disc image in the virtual filesystem. // Register the disc image in the virtual filesystem.
auto device = std::make_unique<vfs::DiscImageDevice>(mount_path, path); auto device = std::make_unique<vfs::DiscImageDevice>(mount_path, path);
if (!device->Initialize()) { if (!device->Initialize()) {
xe::FatalError("Unable to mount disc image; file not found or corrupt."); XELOGE("Unable to mount disc image; file not found or corrupt.");
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 disc image."); XELOGE("Unable to register disc image.");
return X_STATUS_NO_SUCH_FILE; return X_STATUS_NO_SUCH_FILE;
} }