videosettings: cleanup

Signed-off-by: Markus Volk <f_l_k@t-online.de>
This commit is contained in:
Markus Volk
2020-03-11 07:01:24 +01:00
parent 5f613f49c0
commit 0ef29d2934
3 changed files with 118 additions and 60 deletions

View File

@@ -211,108 +211,172 @@ const CMenuOptionChooser::keyval VIDEOMENU_VIDEOSIGNAL_HD1PLUS_CINCH_OPTIONS[VID
#if HAVE_TRIPLEDRAGON
CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] =
{
{ VIDEO_STD_SECAM, NONEXISTANT_LOCALE, "SECAM" },
{ VIDEO_STD_NTSC, NONEXISTANT_LOCALE, "NTSC" },
{ VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" },
{ VIDEO_STD_SECAM, NONEXISTANT_LOCALE, "SECAM" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ -1, NONEXISTANT_LOCALE, "576p" },
{ -1, NONEXISTANT_LOCALE, "720p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "720p 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080i 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 23.97Hz"},
{ -1, NONEXISTANT_LOCALE, "1080p 24Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 25Hz" },
{ VIDEO_STD_NTSC, NONEXISTANT_LOCALE, "NTSC" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ -1, NONEXISTANT_LOCALE, "720p 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 29.97Hz"},
{ -1, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 60Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 24Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 25Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 30Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "Auto" }
};
#elif HAVE_COOL_HARDWARE
#elif BOXMODEL_CS_HD1
/* numbers corresponding to video.cpp from zapit */
CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] =
{
{ VIDEO_STD_SECAM, NONEXISTANT_LOCALE, "SECAM" },
{ VIDEO_STD_NTSC, NONEXISTANT_LOCALE, "NTSC" },
{ VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" },
{ VIDEO_STD_SECAM, NONEXISTANT_LOCALE, "SECAM" },
{ VIDEO_STD_480P, NONEXISTANT_LOCALE, "480p" },
{ VIDEO_STD_576P, NONEXISTANT_LOCALE, "576p" },
{ VIDEO_STD_720P50, NONEXISTANT_LOCALE, "720p 50Hz" },
{ VIDEO_STD_720P60, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I50, NONEXISTANT_LOCALE, "1080i 50Hz" },
#ifdef BOXMODEL_CS_HD2
{ VIDEO_STD_1080P50, NONEXISTANT_LOCALE, "1080p 50Hz" },
#else
{ -1, NONEXISTANT_LOCALE, "1080p 50Hz" },
#endif
{ VIDEO_STD_1080I60, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 23.97Hz"},
{ VIDEO_STD_1080P24, NONEXISTANT_LOCALE, "1080p 24Hz" },
{ VIDEO_STD_1080P25, NONEXISTANT_LOCALE, "1080p 25Hz" },
{ VIDEO_STD_NTSC, NONEXISTANT_LOCALE, "NTSC" },
{ VIDEO_STD_480P, NONEXISTANT_LOCALE, "480p" },
{ VIDEO_STD_720P60, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I60, NONEXISTANT_LOCALE, "1080i 60Hz" },
#ifdef BOXMODEL_CS_HD2
/* TODO: fix this crap */
{ VIDEO_STD_1080P60, NONEXISTANT_LOCALE, "1080p 60Hz" },
{ VIDEO_STD_1080P2397, NONEXISTANT_LOCALE, "1080p 23.97Hz"},
{ VIDEO_STD_1080P2997, NONEXISTANT_LOCALE, "1080p 29.97Hz"},
#endif
{ -1, NONEXISTANT_LOCALE, "1080p 29.97Hz"},
{ -1, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 60Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 24Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 25Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 30Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 50Hz" },
{ VIDEO_STD_AUTO, NONEXISTANT_LOCALE, "Auto" }
};
#elif BOXMODEL_CS_HD2
/* numbers corresponding to video.cpp from zapit */
CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] =
{
{ VIDEO_STD_NTSC, NONEXISTANT_LOCALE, "NTSC" },
{ VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" },
{ VIDEO_STD_SECAM, NONEXISTANT_LOCALE, "SECAM" },
{ VIDEO_STD_480P, NONEXISTANT_LOCALE, "480p" },
{ VIDEO_STD_576P, NONEXISTANT_LOCALE, "576p" },
{ VIDEO_STD_720P50, NONEXISTANT_LOCALE, "720p 50Hz" },
{ VIDEO_STD_720P60, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I50, NONEXISTANT_LOCALE, "1080i 50Hz" },
{ VIDEO_STD_1080I60, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ VIDEO_STD_1080P2397, NONEXISTANT_LOCALE, "1080p 23.97Hz"},
{ VIDEO_STD_1080P24, NONEXISTANT_LOCALE, "1080p 24Hz" },
{ VIDEO_STD_1080P25, NONEXISTANT_LOCALE, "1080p 25Hz" },
{ VIDEO_STD_1080P2997, NONEXISTANT_LOCALE, "1080p 29.97Hz"},
{ VIDEO_STD_1080P50, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ VIDEO_STD_1080P60, NONEXISTANT_LOCALE, "1080p 60Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 24Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 25Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 30Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 50Hz" },
{ VIDEO_STD_AUTO, NONEXISTANT_LOCALE, "Auto" }
};
#elif HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE
CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] =
{
{ -1, NONEXISTANT_LOCALE, "SECAM" },
{ -1, NONEXISTANT_LOCALE, "NTSC" },
{ VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" },
{ -1, NONEXISTANT_LOCALE, "SECAM" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ VIDEO_STD_576P, NONEXISTANT_LOCALE, "576p" },
{ VIDEO_STD_720P50, NONEXISTANT_LOCALE, "720p 50Hz" },
{ VIDEO_STD_720P60, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I50, NONEXISTANT_LOCALE, "1080i 50Hz" },
{ VIDEO_STD_1080I60, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 23.97Hz"},
{ VIDEO_STD_1080P24, NONEXISTANT_LOCALE, "1080p 24Hz" },
{ VIDEO_STD_1080P25, NONEXISTANT_LOCALE, "1080p 25Hz" },
{ -1, NONEXISTANT_LOCALE, "NTSC" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ VIDEO_STD_720P60, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I60, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ VIDEO_STD_1080P50, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 29.97Hz"},
{ VIDEO_STD_1080P50, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 60Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 24Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 25Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 30Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "Auto" }
};
#elif HAVE_ARM_HARDWARE
#elif BOXMODEL_HD51 || BOXMODEL_H7 || BOXMODEL_BRE2ZE4K || BOXMODEL_HD60
CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] =
{
{ -1, NONEXISTANT_LOCALE, "SECAM" },
{ -1, NONEXISTANT_LOCALE, "NTSC" },
{ VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" },
{ -1, NONEXISTANT_LOCALE, "SECAM" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ VIDEO_STD_576P, NONEXISTANT_LOCALE, "576p" },
{ VIDEO_STD_720P50, NONEXISTANT_LOCALE, "720p 50Hz" },
{ VIDEO_STD_720P60, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I50, NONEXISTANT_LOCALE, "1080i 50Hz" },
{ VIDEO_STD_1080I60, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 23.97Hz"},
{ VIDEO_STD_1080P24, NONEXISTANT_LOCALE, "1080p 24Hz" },
{ VIDEO_STD_1080P25, NONEXISTANT_LOCALE, "1080p 25Hz" },
{ -1, NONEXISTANT_LOCALE, "NTSC" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ VIDEO_STD_720P60, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I60, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ VIDEO_STD_1080P50, NONEXISTANT_LOCALE, "1080p 50Hz" },
#if BOXMODEL_OSMIO4K || BOXMODEL_OSMIO4KPLUS
{ VIDEO_STD_1080P60, NONEXISTANT_LOCALE, "1080p 60Hz" },
#else
{ -1, NONEXISTANT_LOCALE, "1080p 29.97Hz"},
{ VIDEO_STD_1080P50, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 60Hz" },
#endif
{ VIDEO_STD_2160P24, NONEXISTANT_LOCALE, "2160p 24Hz" },
{ VIDEO_STD_2160P25, NONEXISTANT_LOCALE, "2160p 25Hz" },
{ VIDEO_STD_2160P30, NONEXISTANT_LOCALE, "2160p 30Hz" },
{ VIDEO_STD_2160P50, NONEXISTANT_LOCALE, "2160p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "Auto" }
};
#elif BOXMODEL_OSMIO4K || BOXMODEL_OSMIO4KPLUS
CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] =
{
{ -1, NONEXISTANT_LOCALE, "NTSC" },
{ VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" },
{ -1, NONEXISTANT_LOCALE, "SECAM" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ VIDEO_STD_576P, NONEXISTANT_LOCALE, "576p" },
{ VIDEO_STD_720P50, NONEXISTANT_LOCALE, "720p 50Hz" },
{ VIDEO_STD_720P60, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I50, NONEXISTANT_LOCALE, "1080i 50Hz" },
{ VIDEO_STD_1080I60, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 23.97Hz"},
{ VIDEO_STD_1080P24, NONEXISTANT_LOCALE, "1080p 24Hz" },
{ VIDEO_STD_1080P25, NONEXISTANT_LOCALE, "1080p 25Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 29.97Hz"},
{ VIDEO_STD_1080P50, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ VIDEO_STD_1080P60, NONEXISTANT_LOCALE, "1080p 60Hz" },
{ VIDEO_STD_2160P24, NONEXISTANT_LOCALE, "2160p 24Hz" },
{ VIDEO_STD_2160P25, NONEXISTANT_LOCALE, "2160p 25Hz" },
{ VIDEO_STD_2160P30, NONEXISTANT_LOCALE, "2160p 30Hz" },
{ VIDEO_STD_2160P50, NONEXISTANT_LOCALE, "2160p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "Auto" }
};
#else
/* generic PC -> 4 different resolutions, 480, 576, 720 and 1080 lines */
CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] =
{
{ -1, NONEXISTANT_LOCALE, "SECAM" },
{ VIDEO_STD_NTSC, NONEXISTANT_LOCALE, "NTSC" },
{ VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" },
{ -1, NONEXISTANT_LOCALE, "SECAM" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ -1, NONEXISTANT_LOCALE, "576p" },
{ VIDEO_STD_720P50, NONEXISTANT_LOCALE, "720p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "720p 60Hz" },
{ VIDEO_STD_1080I50, NONEXISTANT_LOCALE, "1080i 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 23.97Hz"},
{ -1, NONEXISTANT_LOCALE, "1080p 24Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 25Hz" },
{ VIDEO_STD_NTSC, NONEXISTANT_LOCALE, "NTSC" },
{ -1, NONEXISTANT_LOCALE, "480p" },
{ -1, NONEXISTANT_LOCALE, "720p 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080i 60Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 29.97Hz"},
{ -1, NONEXISTANT_LOCALE, "1080p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "1080p 60Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 24Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 25Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 30Hz" },
{ -1, NONEXISTANT_LOCALE, "2160p 50Hz" },
{ -1, NONEXISTANT_LOCALE, "Auto" }
};
#endif

View File

@@ -42,9 +42,9 @@ class CVideoSettings : public CMenuWidget, CChangeObserver
CMenuOptionChooser *VcrVideoOutSignalOptionChooser;
int prev_video_mode;
int is_wizard;
int width, selected;
int showVideoSetup();
std::vector<CMenuOptionChooser::keyval_ext> videomenu_43mode_options;
@@ -53,18 +53,18 @@ class CVideoSettings : public CMenuWidget, CChangeObserver
public:
CVideoSettings(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
~CVideoSettings();
virtual bool changeNotify(const neutrino_locale_t OptionName, void *data);
//virtual void paint();
void nextMode();
void next43Mode();
void SwitchFormat();
void setVideoSettings();
void setupVideoSystem(bool do_ask);
void setWizardMode(int mode) {is_wizard = mode;};
int exec(CMenuTarget* parent, const std::string & actionKey);
};
#endif

View File

@@ -46,13 +46,7 @@
#include <string>
#include <list>
#ifdef BOXMODEL_CS_HD2
#define VIDEOMENU_VIDEOMODE_OPTION_COUNT 16
#elif HAVE_ARM_HARDWARE
#define VIDEOMENU_VIDEOMODE_OPTION_COUNT 18
#else
#define VIDEOMENU_VIDEOMODE_OPTION_COUNT 13
#endif
#define VIDEOMENU_VIDEOMODE_OPTION_COUNT 20
struct SNeutrinoTheme
{