mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 11:48:07 -05:00
yuzu: Enable to use controller to close a game
- Add General setting to choose if a confirm dialog is shown when stopping - Show the right confirm dialog if wanted - Reuse dialog window that ask to close the game - Add "L + Plus + Minus" default shortcut to Stop emulation - Create generic question dialog based on TAS dialog - It allows controller interaction on most dialogs
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QMessageBox>
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
|
||||
@ -15,6 +16,7 @@
|
||||
#include "input_common/drivers/tas_input.h"
|
||||
#include "yuzu/compatibility_list.h"
|
||||
#include "yuzu/hotkeys.h"
|
||||
#include "yuzu/util/controller_navigation.h"
|
||||
|
||||
#ifdef __unix__
|
||||
#include <QVariant>
|
||||
@ -431,6 +433,17 @@ private:
|
||||
const std::string& command, const std::string& arguments,
|
||||
const std::string& categories, const std::string& keywords);
|
||||
|
||||
/**
|
||||
* Mimic the behavior of QMessageBox::question but link controller navigation to the dialog
|
||||
* The only difference is that it returns a boolean.
|
||||
*
|
||||
* @returns true if buttons contains QMessageBox::Yes and the user clicks on the "Yes" button.
|
||||
*/
|
||||
bool question(QWidget* parent, const QString& title, const QString& text,
|
||||
QMessageBox::StandardButtons buttons =
|
||||
QMessageBox::StandardButtons(QMessageBox::Yes | QMessageBox::No),
|
||||
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
|
||||
|
||||
std::unique_ptr<Ui::MainWindow> ui;
|
||||
|
||||
std::unique_ptr<Core::System> system;
|
||||
|
Reference in New Issue
Block a user