mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
Merge e5d5f73875 into 01ae24e46e
This commit is contained in:
commit
caff984dc1
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue