|
|
@ -278,6 +278,7 @@ void GMainWindow::ConnectWidgetEvents() {
|
|
|
|
void GMainWindow::ConnectMenuEvents() {
|
|
|
|
void GMainWindow::ConnectMenuEvents() {
|
|
|
|
// File
|
|
|
|
// File
|
|
|
|
connect(ui.action_Load_File, &QAction::triggered, this, &GMainWindow::OnMenuLoadFile);
|
|
|
|
connect(ui.action_Load_File, &QAction::triggered, this, &GMainWindow::OnMenuLoadFile);
|
|
|
|
|
|
|
|
connect(ui.action_Load_Folder, &QAction::triggered, this, &GMainWindow::OnMenuLoadFolder);
|
|
|
|
connect(ui.action_Select_Game_List_Root, &QAction::triggered, this,
|
|
|
|
connect(ui.action_Select_Game_List_Root, &QAction::triggered, this,
|
|
|
|
&GMainWindow::OnMenuSelectGameListRoot);
|
|
|
|
&GMainWindow::OnMenuSelectGameListRoot);
|
|
|
|
connect(ui.action_Exit, &QAction::triggered, this, &QMainWindow::close);
|
|
|
|
connect(ui.action_Exit, &QAction::triggered, this, &QMainWindow::close);
|
|
|
@ -564,6 +565,15 @@ void GMainWindow::OnMenuLoadFile() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::OnMenuLoadFolder() {
|
|
|
|
|
|
|
|
QDir dir = QFileDialog::getExistingDirectory(this, tr("Open Extracted ROM Directory"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QStringList matchingMain = dir.entryList(QStringList() << "main", QDir::Files);
|
|
|
|
|
|
|
|
if (matchingMain.size() == 1) {
|
|
|
|
|
|
|
|
BootGame(matchingMain[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::OnMenuSelectGameListRoot() {
|
|
|
|
void GMainWindow::OnMenuSelectGameListRoot() {
|
|
|
|
QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory"));
|
|
|
|
QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory"));
|
|
|
|
if (!dir_path.isEmpty()) {
|
|
|
|
if (!dir_path.isEmpty()) {
|
|
|
|