INI option to hide RBF datecode.
This commit is contained in:
@@ -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)
|
||||
|
||||
1
cfg.cpp
1
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
|
||||
|
||||
1
cfg.h
1
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;
|
||||
|
||||
|
||||
3
menu.cpp
3
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
|
||||
|
||||
@@ -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) ||
|
||||
|
||||
Reference in New Issue
Block a user