add apply button to display settings

This commit is contained in:
fgsfds 2020-06-11 06:12:03 +03:00
parent 3dff608c7b
commit 3557e895fe
2 changed files with 9 additions and 1 deletions

View File

@ -52,6 +52,7 @@
#define TEXT_RESET_WINDOW _("RESET WINDOW") #define TEXT_RESET_WINDOW _("RESET WINDOW")
#define TEXT_OPT_HUD _("HUD") #define TEXT_OPT_HUD _("HUD")
#define TEXT_OPT_THREEPOINT _("THREE POINT") #define TEXT_OPT_THREEPOINT _("THREE POINT")
#define TEXT_OPT_APPLY _("APPLY")
#define TEXT_BIND_A _("A BUTTON") #define TEXT_BIND_A _("A BUTTON")
#define TEXT_BIND_B _("B BUTTON") #define TEXT_BIND_B _("B BUTTON")
@ -111,6 +112,7 @@
#define TEXT_RESET_WINDOW _("Reset Window") #define TEXT_RESET_WINDOW _("Reset Window")
#define TEXT_OPT_HUD _("HUD") #define TEXT_OPT_HUD _("HUD")
#define TEXT_OPT_THREEPOINT _("Three-point") #define TEXT_OPT_THREEPOINT _("Three-point")
#define TEXT_OPT_APPLY _("Apply")
#define TEXT_BIND_A _("A Button") #define TEXT_BIND_A _("A Button")
#define TEXT_BIND_B _("B Button") #define TEXT_BIND_B _("B Button")

View File

@ -81,6 +81,7 @@ static const u8 optsVideoStr[][32] = {
{ TEXT_OPT_DOUBLE }, { TEXT_OPT_DOUBLE },
{ TEXT_OPT_HUD }, { TEXT_OPT_HUD },
{ TEXT_OPT_THREEPOINT }, { TEXT_OPT_THREEPOINT },
{ TEXT_OPT_APPLY },
}; };
static const u8 optsAudioStr[][32] = { static const u8 optsAudioStr[][32] = {
@ -206,6 +207,10 @@ static void optvideo_reset_window(UNUSED struct Option *self, s32 arg) {
} }
} }
static void optvideo_apply(UNUSED struct Option *self, s32 arg) {
if (!arg) configWindow.settings_changed = true;
}
/* submenu option lists */ /* submenu option lists */
#ifdef BETTERCAMERA #ifdef BETTERCAMERA
@ -247,8 +252,9 @@ static struct Option optsVideo[] = {
DEF_OPT_TOGGLE( optsVideoStr[0], &configWindow.fullscreen ), DEF_OPT_TOGGLE( optsVideoStr[0], &configWindow.fullscreen ),
DEF_OPT_CHOICE( optsVideoStr[5], &configWindow.vsync, vsyncChoices ), DEF_OPT_CHOICE( optsVideoStr[5], &configWindow.vsync, vsyncChoices ),
DEF_OPT_CHOICE( optsVideoStr[1], &configFiltering, filterChoices ), DEF_OPT_CHOICE( optsVideoStr[1], &configFiltering, filterChoices ),
DEF_OPT_BUTTON( optsVideoStr[4], optvideo_reset_window ),
DEF_OPT_TOGGLE( optsVideoStr[7], &configHUD ), DEF_OPT_TOGGLE( optsVideoStr[7], &configHUD ),
DEF_OPT_BUTTON( optsVideoStr[4], optvideo_reset_window ),
DEF_OPT_BUTTON( optsVideoStr[9], optvideo_apply ),
}; };
static struct Option optsAudio[] = { static struct Option optsAudio[] = {