input: INI option (controller_info) to display/disable buttons map upon first press.
This commit is contained in:
@@ -87,3 +87,7 @@ vsync_adjust=0
|
||||
; predefined modes as a base. This will reduce the range of pixel clock.
|
||||
;video_mode_ntsc=0
|
||||
;video_mode_pal=7
|
||||
|
||||
; 1-10 (seconds) to display controller's button map upon first time key press
|
||||
; 0 - disable
|
||||
controller_info=6
|
||||
|
||||
2
cfg.cpp
2
cfg.cpp
@@ -14,6 +14,7 @@ void MiSTer_ini_parse()
|
||||
memset(&cfg, 0, sizeof(cfg));
|
||||
cfg.bootscreen = 1;
|
||||
cfg.fb_terminal = 1;
|
||||
cfg.controller_info = 6;
|
||||
ini_parse(&ini_cfg, altcfg());
|
||||
}
|
||||
|
||||
@@ -59,6 +60,7 @@ const ini_var_t ini_vars[] = {
|
||||
{ "OSD_ROTATE", (void*)(&(cfg.osd_rotate)), UINT8, 0, 2 },
|
||||
{ "GAMEPAD_DEFAULTS", (void*)(&(cfg.gamepad_defaults)), UINT8, 0, 1 },
|
||||
{ "RECENTS", (void*)(&(cfg.recents)), UINT8, 0, 1 },
|
||||
{ "CONTROLLER_INFO", (void*)(&(cfg.controller_info)), UINT8, 0, 10 },
|
||||
};
|
||||
|
||||
// mist ini config
|
||||
|
||||
1
cfg.h
1
cfg.h
@@ -26,6 +26,7 @@ typedef struct {
|
||||
uint8_t hdmi_limited;
|
||||
uint8_t direct_video;
|
||||
uint8_t video_info;
|
||||
uint8_t controller_info;
|
||||
uint8_t vsync_adjust;
|
||||
uint8_t kbd_nomouse;
|
||||
uint8_t mouse_throttle;
|
||||
|
||||
@@ -249,7 +249,10 @@ void map_joystick(uint32_t *map, uint32_t *mmap)
|
||||
n++;
|
||||
}
|
||||
|
||||
Info(mapinfo, 6000);
|
||||
if (cfg.controller_info)
|
||||
{
|
||||
Info(mapinfo, cfg.controller_info*1000);
|
||||
}
|
||||
}
|
||||
|
||||
static const char* get_std_name(uint16_t code, uint32_t *mmap)
|
||||
@@ -283,5 +286,8 @@ void map_joystick_show(uint32_t *map, uint32_t *mmap)
|
||||
strcat(mapinfo, joy_names[i]);
|
||||
}
|
||||
|
||||
Info(mapinfo, 4000);
|
||||
if (cfg.controller_info)
|
||||
{
|
||||
Info(mapinfo, cfg.controller_info * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user