Qt: Allow command line boot of device path

Untested.
This commit is contained in:
Stenzek
2025-11-01 01:46:58 +10:00
parent 529da22ef5
commit 0d4ffde7c5
2 changed files with 6 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
#include "core/system.h"
#include "core/system_private.h"
#include "util/cd_image.h"
#include "util/gpu_device.h"
#include "util/imgui_manager.h"
#include "util/ini_settings_interface.h"
@@ -1766,7 +1767,8 @@ bool MiniHost::ParseCommandLineParametersAndInitializeConfig(int argc, char* arg
// Check the file we're starting actually exists.
if (autoboot && !autoboot->path.empty() && !FileSystem::FileExists(autoboot->path.c_str()))
if (autoboot && !autoboot->path.empty() && !FileSystem::FileExists(autoboot->path.c_str()) &&
!CDImage::IsDeviceName(autoboot->path.c_str()))
{
Host::ReportFatalError("Error", fmt::format("File '{}' does not exist.", autoboot->path));
return false;

View File

@@ -44,6 +44,7 @@
#include "common/threading.h"
#include "util/audio_stream.h"
#include "util/cd_image.h"
#include "util/http_downloader.h"
#include "util/imgui_manager.h"
#include "util/ini_settings_interface.h"
@@ -3310,7 +3311,8 @@ bool QtHost::ParseCommandLineParametersAndInitializeConfig(QApplication& app,
LoadResources();
// Check the file we're starting actually exists.
if (autoboot && !autoboot->path.empty() && !FileSystem::FileExists(autoboot->path.c_str()))
if (autoboot && !autoboot->path.empty() && !FileSystem::FileExists(autoboot->path.c_str()) &&
!CDImage::IsDeviceName(autoboot->path.c_str()))
{
QMessageBox::critical(
nullptr, qApp->translate("QtHost", "Error"),