Run firmware check first, as quasi-early exit, before checking vm devices.
This commit is contained in:
@@ -304,6 +304,11 @@ public abstract class AbstractVirtualMachine implements VirtualMachine {
|
||||
return;
|
||||
}
|
||||
|
||||
if (busController.getDevices().stream().noneMatch(device -> device instanceof FirmwareLoader)) {
|
||||
error(new TranslatableComponent(Constants.COMPUTER_ERROR_MISSING_FIRMWARE));
|
||||
return;
|
||||
}
|
||||
|
||||
final VMDeviceLoadResult loadResult = state.vmAdapter.mount();
|
||||
if (!loadResult.wasSuccessful()) {
|
||||
if (loadResult.getErrorMessage() != null) {
|
||||
@@ -315,11 +320,6 @@ public abstract class AbstractVirtualMachine implements VirtualMachine {
|
||||
return;
|
||||
}
|
||||
|
||||
if (busController.getDevices().stream().noneMatch(device -> device instanceof FirmwareLoader)) {
|
||||
error(new TranslatableComponent(Constants.COMPUTER_ERROR_MISSING_FIRMWARE));
|
||||
return;
|
||||
}
|
||||
|
||||
// May have a valid runner after load. In which case we just had to wait for
|
||||
// bus setup and devices to load. So we can keep using it.
|
||||
if (runner == null) {
|
||||
|
||||
Reference in New Issue
Block a user