mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-25 12:55:00 +00:00
misc changes, part ?/? (#441)
* gui: add option to boot a game by choosing elf file * core: some small implementations * fs: implement open func * add some validations * spirv: add image format * video_core: add eR16Uint to formats
This commit is contained in:
parent
9e810b7524
commit
dcb057dd7f
11 changed files with 75 additions and 0 deletions
|
@ -328,6 +328,7 @@ void MainWindow::CreateConnects() {
|
|||
|
||||
// Package install.
|
||||
connect(ui->bootInstallPkgAct, &QAction::triggered, this, &MainWindow::InstallPkg);
|
||||
connect(ui->bootGameAct, &QAction::triggered, this, &MainWindow::BootGame);
|
||||
connect(ui->gameInstallPathAct, &QAction::triggered, this, &MainWindow::InstallDirectory);
|
||||
|
||||
// elf viewer
|
||||
|
@ -484,6 +485,27 @@ void MainWindow::InstallPkg() {
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::BootGame() {
|
||||
QFileDialog dialog;
|
||||
dialog.setFileMode(QFileDialog::ExistingFile);
|
||||
dialog.setNameFilter(tr("ELF files (*.bin *.elf *.oelf)"));
|
||||
if (dialog.exec()) {
|
||||
QStringList fileNames = dialog.selectedFiles();
|
||||
int nFiles = fileNames.size();
|
||||
|
||||
if (nFiles > 1) {
|
||||
QMessageBox::critical(nullptr, "Game Boot", QString("Only one file can be selected!"));
|
||||
} else {
|
||||
std::filesystem::path path(fileNames[0].toStdString());
|
||||
#ifdef _WIN64
|
||||
path = std::filesystem::path(fileNames[0].toStdWString());
|
||||
#endif
|
||||
Core::Emulator emulator;
|
||||
emulator.Run(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int nPkg) {
|
||||
if (Loader::DetectFileType(file) == Loader::FileTypes::Pkg) {
|
||||
pkg = PKG();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue