mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-12 01:14:33 +00:00
Qt: Resolve command line paths before autobooting
Increase the chances of Game Properties still functioning.
This commit is contained in:
@@ -3306,13 +3306,17 @@ 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()) &&
|
||||
!CDImage::IsDeviceName(autoboot->path.c_str()))
|
||||
if (autoboot && !autoboot->path.empty() && !CDImage::IsDeviceName(autoboot->path.c_str()))
|
||||
{
|
||||
QMessageBox::critical(
|
||||
nullptr, qApp->translate("QtHost", "Error"),
|
||||
qApp->translate("QtHost", "File '%1' does not exist.").arg(QString::fromStdString(autoboot->path)));
|
||||
return false;
|
||||
autoboot->path = Path::RealPath(autoboot->path);
|
||||
|
||||
if (!FileSystem::FileExists(autoboot->path.c_str()))
|
||||
{
|
||||
QMessageBox::critical(
|
||||
nullptr, qApp->translate("QtHost", "Error"),
|
||||
qApp->translate("QtHost", "File '%1' does not exist.").arg(QString::fromStdString(autoboot->path)));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (state_index.has_value())
|
||||
|
||||
Reference in New Issue
Block a user