diff --git a/MiSTer.ini b/MiSTer.ini index 4151def..9d2db36 100644 --- a/MiSTer.ini +++ b/MiSTer.ini @@ -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 diff --git a/cfg.cpp b/cfg.cpp index c355867..06fcfec 100644 --- a/cfg.cpp +++ b/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 diff --git a/cfg.h b/cfg.h index 1924d17..b2931c7 100644 --- a/cfg.h +++ b/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; diff --git a/joymapping.cpp b/joymapping.cpp index 8b898b1..dd8bc21 100644 --- a/joymapping.cpp +++ b/joymapping.cpp @@ -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); + } }