mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Create menu_hash_get_help_enum
This commit is contained in:
parent
a532bc2b0e
commit
84291d2d3d
@ -23,6 +23,25 @@
|
||||
#include "../configuration.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
{
|
||||
uint32_t driver_hash = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case MENU_ENUM_LABEL_WELCOME_TO_RETROARCH:
|
||||
snprintf(s, len,
|
||||
"Welcome to RetroArch\n"
|
||||
);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
|
||||
{
|
||||
uint32_t driver_hash = 0;
|
||||
|
@ -64,7 +64,8 @@ static int action_iterate_help(menu_handle_t *menu,
|
||||
|
||||
timeout = (timeout_end - current) / 1000000;
|
||||
|
||||
menu_hash_get_help(MENU_LABEL_WELCOME_TO_RETROARCH,
|
||||
menu_hash_get_help_enum(
|
||||
MENU_ENUM_LABEL_WELCOME_TO_RETROARCH,
|
||||
s, len);
|
||||
|
||||
if (!timer_end && timeout <= 0)
|
||||
|
48
msg_hash.c
48
msg_hash.c
@ -22,6 +22,54 @@
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
int menu_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
{
|
||||
int ret = -1;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings)
|
||||
goto end;
|
||||
|
||||
#ifdef HAVE_LANGEXTRA
|
||||
switch (settings->user_language)
|
||||
{
|
||||
#if 0
|
||||
case RETRO_LANGUAGE_FRENCH:
|
||||
ret = menu_hash_get_help_fr_enum(hash, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_GERMAN:
|
||||
ret = menu_hash_get_help_de_enum(hash, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_SPANISH:
|
||||
ret = menu_hash_get_help_es_enum(hash, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_ITALIAN:
|
||||
ret = menu_hash_get_help_it_enum(hash, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_PORTUGUESE:
|
||||
ret = menu_hash_get_help_pt_enum(hash, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_DUTCH:
|
||||
ret = menu_hash_get_help_nl_enum(hash, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_ESPERANTO:
|
||||
ret = menu_hash_get_help_eo_enum(hash, s, len);
|
||||
break;
|
||||
case RETRO_LANGUAGE_POLISH:
|
||||
ret = menu_hash_get_help_pl_enum(hash, s, len);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ret == 0)
|
||||
return ret;
|
||||
|
||||
end:
|
||||
return menu_hash_get_help_us_enum(msg, s, len);
|
||||
}
|
||||
|
||||
int menu_hash_get_help(uint32_t hash, char *s, size_t len)
|
||||
{
|
||||
|
@ -2160,7 +2160,9 @@ int menu_hash_get_help_nl(uint32_t hash, char *s, size_t len);
|
||||
|
||||
const char *msg_hash_to_str_us(enum msg_hash_enums msg);
|
||||
int menu_hash_get_help_us(uint32_t hash, char *s, size_t len);
|
||||
int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
|
||||
int menu_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len);
|
||||
int menu_hash_get_help(uint32_t hash, char *s, size_t len);
|
||||
|
||||
enum msg_file_type msg_hash_to_file_type(uint32_t hash);
|
||||
|
Loading…
x
Reference in New Issue
Block a user