mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-01 12:46:01 +00:00
hot fix : always check if eboot.bin is available in path
This commit is contained in:
parent
38a13832b3
commit
26cca79582
|
@ -10,6 +10,11 @@ int main(int argc, char* argv[]) {
|
||||||
fmt::print("Usage: {} <elf or eboot.bin path>\n", argv[0]);
|
fmt::print("Usage: {} <elf or eboot.bin path>\n", argv[0]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
// check if eboot file exists
|
||||||
|
if (!std::filesystem::exists(argv[1])) {
|
||||||
|
fmt::print("Eboot.bin file not found\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
std::string curArg = argv[i];
|
std::string curArg = argv[i];
|
||||||
|
|
|
@ -509,6 +509,10 @@ void MainWindow::StartGame() {
|
||||||
if (gamePath != "") {
|
if (gamePath != "") {
|
||||||
AddRecentFiles(gamePath);
|
AddRecentFiles(gamePath);
|
||||||
Core::Emulator emulator;
|
Core::Emulator emulator;
|
||||||
|
if (!std::filesystem::exists(gamePath.toUtf8().constData())) {
|
||||||
|
QMessageBox::critical(nullptr, tr("Run Game"), QString(tr("Eboot.bin file not found")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
emulator.Run(gamePath.toUtf8().constData());
|
emulator.Run(gamePath.toUtf8().constData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -610,6 +614,11 @@ void MainWindow::BootGame() {
|
||||||
path = std::filesystem::path(fileNames[0].toStdWString());
|
path = std::filesystem::path(fileNames[0].toStdWString());
|
||||||
#endif
|
#endif
|
||||||
Core::Emulator emulator;
|
Core::Emulator emulator;
|
||||||
|
if (!std::filesystem::exists(path) {
|
||||||
|
QMessageBox::critical(nullptr, tr("Run Game"),
|
||||||
|
QString(tr("Eboot.bin file not found")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
emulator.Run(path);
|
emulator.Run(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -915,6 +924,10 @@ void MainWindow::CreateRecentGameActions() {
|
||||||
QString gamePath = action->text();
|
QString gamePath = action->text();
|
||||||
AddRecentFiles(gamePath); // Update the list.
|
AddRecentFiles(gamePath); // Update the list.
|
||||||
Core::Emulator emulator;
|
Core::Emulator emulator;
|
||||||
|
if (!std::filesystem::exists(gamePath.toUtf8().constData())) {
|
||||||
|
QMessageBox::critical(nullptr, tr("Run Game"), QString(tr("Eboot.bin file not found")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
emulator.Run(gamePath.toUtf8().constData());
|
emulator.Run(gamePath.toUtf8().constData());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue