diff --git a/MiSTer.ini b/MiSTer.ini index 7a6ee1b..e396a26 100644 --- a/MiSTer.ini +++ b/MiSTer.ini @@ -14,6 +14,7 @@ vscale_mode=0 ; 0 - scale to fit the screen height. vscale_border=0 ; set vertical border for TVs cutting the upper/bottom parts of screen (1-99) ;bootscreen=0 ; uncomment to disable boot screen of some cores like Minimig. ;mouse_throttle=10 ; 1-100 mouse speed divisor. Useful for very sensitive mouses +rbf_hide_datecode=0 ; 1 - hides datecodes from rbf file names. Press F2 for quick temporary toggle ; USER button emulation by keybaord. Usually it's reset button. ; 0 - lctrl+lalt+ralt (lctrl+lgui+rgui on keyrah) diff --git a/cfg.cpp b/cfg.cpp index aca8eca..f6b06d5 100644 --- a/cfg.cpp +++ b/cfg.cpp @@ -42,6 +42,7 @@ const ini_var_t ini_vars[] = { { "VOLUMECTL", (void*)(&(cfg.volumectl)), UINT8, 0, 1, 1 }, { "VSCALE_MODE", (void*)(&(cfg.vscale_mode)), UINT8, 0, 3, 1 }, { "VSCALE_BORDER", (void*)(&(cfg.vscale_border)), UINT8, 0, 100, 1 }, + { "RBF_HIDE_DATECODE", (void*)(&(cfg.rbf_hide_datecode)), UINT8, 0, 1, 1 }, }; // mist ini config diff --git a/cfg.h b/cfg.h index eab8d15..6776820 100644 --- a/cfg.h +++ b/cfg.h @@ -31,6 +31,7 @@ typedef struct { uint8_t volumectl; uint8_t vscale_mode; uint8_t vscale_border; + uint8_t rbf_hide_datecode; char video_conf[1024]; } cfg_t; diff --git a/menu.cpp b/menu.cpp index aa30d61..ed79b8b 100644 --- a/menu.cpp +++ b/menu.cpp @@ -3495,6 +3495,9 @@ void PrintDirectory(void) } } + //not full check but should be enough. + if (cfg.rbf_hide_datecode && len > 9 && !strncmp(flist_DirItem(k)->d_name + len - 9, "_20", 3)) len -= 9; + if (len > 28) { len = 27; // trim display length if longer than 30 characters diff --git a/user_io.cpp b/user_io.cpp index 25fe8b0..9416e1b 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -2440,6 +2440,12 @@ void user_io_kbd(uint16_t key, int press) if (press) setBrightness(BRIGHTNESS_UP, 0); } else + if (key == KEY_F2 && osd_is_visible) + { + if (press == 1) cfg.rbf_hide_datecode = !cfg.rbf_hide_datecode; + PrintDirectory(); + } + else if ((core_type == CORE_TYPE_MINIMIG2) || (core_type == CORE_TYPE_MIST) || (core_type == CORE_TYPE_ARCHIE) ||