mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
Implement Close Button
This commit is contained in:
parent
8e08756b6e
commit
e917f1a4b7
@ -4,6 +4,7 @@
|
|||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
|
#include <SDL3/SDL_events.h>
|
||||||
|
|
||||||
#include "about_dialog.h"
|
#include "about_dialog.h"
|
||||||
#include "cheats_patches.h"
|
#include "cheats_patches.h"
|
||||||
@ -231,6 +232,7 @@ void MainWindow::CreateConnects() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->playButton, &QPushButton::clicked, this, &MainWindow::StartGame);
|
connect(ui->playButton, &QPushButton::clicked, this, &MainWindow::StartGame);
|
||||||
|
connect(ui->stopButton, &QPushButton::clicked, this, &MainWindow::StopGame);
|
||||||
connect(m_game_grid_frame.get(), &QTableWidget::cellDoubleClicked, this,
|
connect(m_game_grid_frame.get(), &QTableWidget::cellDoubleClicked, this,
|
||||||
&MainWindow::StartGame);
|
&MainWindow::StartGame);
|
||||||
connect(m_game_list_frame.get(), &QTableWidget::cellDoubleClicked, this,
|
connect(m_game_list_frame.get(), &QTableWidget::cellDoubleClicked, this,
|
||||||
@ -563,6 +565,12 @@ void MainWindow::StartGame() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::StopGame() {
|
||||||
|
SDL_Event quitEvent;
|
||||||
|
quitEvent.type = SDL_EVENT_QUIT;
|
||||||
|
SDL_PushEvent(&quitEvent);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::SearchGameTable(const QString& text) {
|
void MainWindow::SearchGameTable(const QString& text) {
|
||||||
if (isTableList) {
|
if (isTableList) {
|
||||||
for (int row = 0; row < m_game_list_frame->rowCount(); row++) {
|
for (int row = 0; row < m_game_list_frame->rowCount(); row++) {
|
||||||
|
@ -38,6 +38,7 @@ public:
|
|||||||
void InstallDragDropPkg(std::filesystem::path file, int pkgNum, int nPkg);
|
void InstallDragDropPkg(std::filesystem::path file, int pkgNum, int nPkg);
|
||||||
void InstallDirectory();
|
void InstallDirectory();
|
||||||
void StartGame();
|
void StartGame();
|
||||||
|
void StopGame();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void ConfigureGuiFromSettings();
|
void ConfigureGuiFromSettings();
|
||||||
|
Loading…
Reference in New Issue
Block a user