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:
flodavid
2023-07-25 22:31:39 +02:00
parent da6824d9fd
commit a34565727b
5 changed files with 75 additions and 32 deletions

View File

@ -56,6 +56,8 @@ enum class Theme {
MidnightBlueColorful,
};
enum AskStopIndex : int { Always, Game, Never };
using Themes = std::array<std::pair<const char*, const char*>, 6>;
extern const Themes themes;
@ -94,6 +96,9 @@ struct Values {
Setting<bool> confirm_before_closing{
linkage, true, "confirmClose", Category::UiGeneral, Settings::Specialization::Default,
true, true};
Setting<bool> confirm_before_stopping{
linkage, true, "confirmStop", Category::UiGeneral, Settings::Specialization::Default,
true, true};
Setting<bool> first_start{linkage, true, "firstStart", Category::Ui};
Setting<bool> pause_when_in_background{linkage,
false,