2015-06-30 23:42:04 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2017-03-22 02:09:18 +00:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2019-02-22 21:31:54 +00:00
|
|
|
* Copyright (C) 2016-2019 - Brad Parker
|
2015-06-30 23:42:04 +00:00
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2017-04-29 11:20:50 +00:00
|
|
|
#include <stdio.h>
|
2015-09-01 09:59:27 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2020-12-28 18:55:54 +00:00
|
|
|
#include <lrc_hash.h>
|
2016-01-20 04:21:52 +00:00
|
|
|
#include <string/stdstring.h>
|
2017-04-29 11:20:50 +00:00
|
|
|
#include <libretro.h>
|
2015-06-30 23:42:04 +00:00
|
|
|
|
2016-09-08 04:07:43 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2015-06-30 23:42:04 +00:00
|
|
|
#include "msg_hash.h"
|
|
|
|
|
2023-02-05 02:28:05 +00:00
|
|
|
#if defined(_MSC_VER) && !defined(_XBOX) && (_MSC_VER >= 1500 && _MSC_VER < 1900)
|
|
|
|
#if (_MSC_VER >= 1700)
|
|
|
|
/* https://support.microsoft.com/en-us/kb/980263 */
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
#endif
|
|
|
|
#pragma warning(disable:4566)
|
|
|
|
#endif
|
|
|
|
|
2020-05-30 12:26:10 +00:00
|
|
|
/* TODO/FIXME - static public global variable */
|
2017-05-15 18:41:04 +00:00
|
|
|
static unsigned uint_user_language;
|
2015-06-30 23:42:04 +00:00
|
|
|
|
2020-06-12 06:06:30 +00:00
|
|
|
int msg_hash_get_help_enum(enum msg_hash_enums msg, char *s, size_t len)
|
2016-07-24 09:43:40 +00:00
|
|
|
{
|
2023-08-17 01:07:51 +00:00
|
|
|
int ret = msg_hash_get_help_us_enum(msg, s, len);
|
|
|
|
/* Replace line-breaks with "empty line-breaks" for readability */
|
|
|
|
const char *temp = string_replace_substring(s,
|
|
|
|
"\n", STRLEN_CONST("\n"),
|
|
|
|
"\n \n", STRLEN_CONST("\n \n"));
|
|
|
|
|
|
|
|
strlcpy(s, temp, len);
|
|
|
|
return ret;
|
2016-07-24 09:43:40 +00:00
|
|
|
}
|
2016-06-20 13:21:42 +00:00
|
|
|
|
2019-11-16 03:08:49 +00:00
|
|
|
const char *get_user_language_iso639_1(bool limit)
|
|
|
|
{
|
|
|
|
switch (uint_user_language)
|
|
|
|
{
|
|
|
|
case RETRO_LANGUAGE_FRENCH:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "fr";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_GERMAN:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "de";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_SPANISH:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "es";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_ITALIAN:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "it";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_PORTUGUESE_BRAZIL:
|
|
|
|
if (limit)
|
2020-10-15 04:17:57 +00:00
|
|
|
return "pt";
|
|
|
|
return "pt_br";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_PORTUGUESE_PORTUGAL:
|
|
|
|
if (limit)
|
2020-10-15 04:17:57 +00:00
|
|
|
return "pt";
|
|
|
|
return "pt_pt";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_DUTCH:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "nl";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_ESPERANTO:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "eo";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_POLISH:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "pl";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_JAPANESE:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "ja";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_KOREAN:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "ko";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_VIETNAMESE:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "vi";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_CHINESE_SIMPLIFIED:
|
2021-01-31 01:46:16 +00:00
|
|
|
if (limit)
|
|
|
|
return "zh";
|
|
|
|
return "zh_cn";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_CHINESE_TRADITIONAL:
|
2021-01-31 01:46:16 +00:00
|
|
|
if (limit)
|
|
|
|
return "zh";
|
|
|
|
return "zh_tw";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_ARABIC:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "ar";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_GREEK:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "el";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_TURKISH:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "tr";
|
2020-05-02 06:29:17 +00:00
|
|
|
case RETRO_LANGUAGE_SLOVAK:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "sk";
|
2019-11-16 03:08:49 +00:00
|
|
|
case RETRO_LANGUAGE_RUSSIAN:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "ru";
|
2020-06-04 11:54:28 +00:00
|
|
|
case RETRO_LANGUAGE_PERSIAN:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "fa";
|
2020-06-04 11:54:28 +00:00
|
|
|
case RETRO_LANGUAGE_HEBREW:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "he";
|
2020-06-04 11:54:28 +00:00
|
|
|
case RETRO_LANGUAGE_ASTURIAN:
|
2020-10-15 04:17:57 +00:00
|
|
|
return "ast";
|
2020-12-12 17:02:14 +00:00
|
|
|
case RETRO_LANGUAGE_FINNISH:
|
|
|
|
return "fi";
|
2022-01-19 18:12:55 +00:00
|
|
|
case RETRO_LANGUAGE_INDONESIAN:
|
|
|
|
return "id";
|
|
|
|
case RETRO_LANGUAGE_SWEDISH:
|
|
|
|
return "sv";
|
|
|
|
case RETRO_LANGUAGE_UKRAINIAN:
|
|
|
|
return "uk";
|
2022-03-07 18:11:39 +00:00
|
|
|
case RETRO_LANGUAGE_CZECH:
|
|
|
|
return "cs";
|
2022-04-19 09:58:50 +00:00
|
|
|
case RETRO_LANGUAGE_CATALAN_VALENCIA:
|
2022-10-12 21:26:00 +00:00
|
|
|
if (limit)
|
|
|
|
return "ca";
|
2023-03-18 22:05:32 +00:00
|
|
|
return "ca_ES@valencia";
|
2022-04-20 12:37:24 +00:00
|
|
|
case RETRO_LANGUAGE_CATALAN:
|
|
|
|
return "ca";
|
2022-10-12 21:26:00 +00:00
|
|
|
case RETRO_LANGUAGE_BRITISH_ENGLISH:
|
|
|
|
if (limit)
|
|
|
|
return "en";
|
|
|
|
return "en_gb";
|
2022-11-04 18:52:39 +00:00
|
|
|
case RETRO_LANGUAGE_HUNGARIAN:
|
|
|
|
return "hu";
|
2023-10-31 12:51:57 +00:00
|
|
|
case RETRO_LANGUAGE_BELARUSIAN:
|
|
|
|
return "be";
|
2019-11-16 03:08:49 +00:00
|
|
|
}
|
2020-10-15 04:17:57 +00:00
|
|
|
return "en";
|
2019-11-16 03:08:49 +00:00
|
|
|
}
|
|
|
|
|
2023-02-05 02:28:05 +00:00
|
|
|
#ifdef HAVE_LANGEXTRA
|
|
|
|
static const char *msg_hash_to_str_he(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_he.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_sk(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_sk.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_uk(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_uk.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_eo(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_eo.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_pl(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_pl.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_fi(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_fi.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_hu(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_hu.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
2023-10-31 12:51:57 +00:00
|
|
|
static const char *msg_hash_to_str_be(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_be.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
2023-02-05 02:28:05 +00:00
|
|
|
static const char *msg_hash_to_str_en(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_en.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_it(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_it.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_fa(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_fa.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_ast(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_ast.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_nl(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_nl.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_sv(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_sv.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_id(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_id.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_cs(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_cs.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_ar(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_ar.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_fr(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_fr.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_cht(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_cht.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_de(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_de.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_es(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_es.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
2023-04-23 05:59:56 +00:00
|
|
|
static const char *msg_hash_to_str_ca(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_ca.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_el(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_el.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_jp(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_ja.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_ko(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_ko.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_pt_pt(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_pt_pt.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_ru(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_ru.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_tr(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_tr.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_val(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_val.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
|
|
|
static const char *msg_hash_to_str_vn(enum msg_hash_enums msg)
|
|
|
|
{
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_vn.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
|
|
|
}
|
|
|
|
|
2023-08-12 12:46:35 +00:00
|
|
|
static const char *msg_hash_to_str_chs(enum msg_hash_enums msg)
|
2023-02-05 02:28:05 +00:00
|
|
|
{
|
2023-08-12 12:46:35 +00:00
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_chs.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2023-04-23 05:59:56 +00:00
|
|
|
|
2023-08-12 12:46:35 +00:00
|
|
|
return "null";
|
2023-04-23 05:59:56 +00:00
|
|
|
}
|
|
|
|
|
2023-08-12 12:46:35 +00:00
|
|
|
static const char *msg_hash_to_str_pt_br(enum msg_hash_enums msg)
|
2023-04-23 05:59:56 +00:00
|
|
|
{
|
2023-08-12 12:46:35 +00:00
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
#include "intl/msg_hash_pt_br.h"
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return "null";
|
2023-04-23 05:59:56 +00:00
|
|
|
}
|
2023-08-12 12:46:35 +00:00
|
|
|
|
2023-02-05 02:28:05 +00:00
|
|
|
#endif
|
|
|
|
|
2016-06-14 13:04:49 +00:00
|
|
|
const char *msg_hash_to_str(enum msg_hash_enums msg)
|
2015-06-30 23:42:04 +00:00
|
|
|
{
|
|
|
|
const char *ret = NULL;
|
|
|
|
|
2016-06-07 04:05:41 +00:00
|
|
|
#ifdef HAVE_LANGEXTRA
|
2017-05-15 18:41:04 +00:00
|
|
|
switch (uint_user_language)
|
2015-06-30 23:42:04 +00:00
|
|
|
{
|
|
|
|
case RETRO_LANGUAGE_FRENCH:
|
2016-06-14 13:04:49 +00:00
|
|
|
ret = msg_hash_to_str_fr(msg);
|
2015-06-30 23:42:04 +00:00
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_GERMAN:
|
2016-06-14 13:04:49 +00:00
|
|
|
ret = msg_hash_to_str_de(msg);
|
2015-06-30 23:42:04 +00:00
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_SPANISH:
|
2016-06-14 13:04:49 +00:00
|
|
|
ret = msg_hash_to_str_es(msg);
|
2015-06-30 23:42:04 +00:00
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_ITALIAN:
|
2016-06-14 13:04:49 +00:00
|
|
|
ret = msg_hash_to_str_it(msg);
|
2015-06-30 23:42:04 +00:00
|
|
|
break;
|
2017-04-07 18:15:44 +00:00
|
|
|
case RETRO_LANGUAGE_PORTUGUESE_BRAZIL:
|
|
|
|
ret = msg_hash_to_str_pt_br(msg);
|
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_PORTUGUESE_PORTUGAL:
|
|
|
|
ret = msg_hash_to_str_pt_pt(msg);
|
2015-06-30 23:42:04 +00:00
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_DUTCH:
|
2016-06-14 13:04:49 +00:00
|
|
|
ret = msg_hash_to_str_nl(msg);
|
2015-06-30 23:42:04 +00:00
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_ESPERANTO:
|
2016-06-14 13:04:49 +00:00
|
|
|
ret = msg_hash_to_str_eo(msg);
|
2015-07-07 00:56:27 +00:00
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_POLISH:
|
2016-06-14 13:04:49 +00:00
|
|
|
ret = msg_hash_to_str_pl(msg);
|
2015-07-07 00:56:27 +00:00
|
|
|
break;
|
2016-02-24 18:19:03 +00:00
|
|
|
case RETRO_LANGUAGE_RUSSIAN:
|
2016-06-14 13:04:49 +00:00
|
|
|
ret = msg_hash_to_str_ru(msg);
|
2016-02-24 18:19:03 +00:00
|
|
|
break;
|
2016-08-20 19:37:03 +00:00
|
|
|
case RETRO_LANGUAGE_JAPANESE:
|
|
|
|
ret = msg_hash_to_str_jp(msg);
|
|
|
|
break;
|
2017-03-04 16:39:14 +00:00
|
|
|
case RETRO_LANGUAGE_KOREAN:
|
|
|
|
ret = msg_hash_to_str_ko(msg);
|
|
|
|
break;
|
2016-10-27 18:49:15 +00:00
|
|
|
case RETRO_LANGUAGE_VIETNAMESE:
|
|
|
|
ret = msg_hash_to_str_vn(msg);
|
|
|
|
break;
|
2016-10-29 04:07:28 +00:00
|
|
|
case RETRO_LANGUAGE_CHINESE_SIMPLIFIED:
|
|
|
|
ret = msg_hash_to_str_chs(msg);
|
|
|
|
break;
|
2017-07-23 03:59:47 +00:00
|
|
|
case RETRO_LANGUAGE_CHINESE_TRADITIONAL:
|
|
|
|
ret = msg_hash_to_str_cht(msg);
|
|
|
|
break;
|
2018-02-05 19:54:55 +00:00
|
|
|
case RETRO_LANGUAGE_ARABIC:
|
|
|
|
ret = msg_hash_to_str_ar(msg);
|
|
|
|
break;
|
2018-10-11 22:22:33 +00:00
|
|
|
case RETRO_LANGUAGE_GREEK:
|
|
|
|
ret = msg_hash_to_str_el(msg);
|
|
|
|
break;
|
2019-04-17 23:08:23 +00:00
|
|
|
case RETRO_LANGUAGE_TURKISH:
|
|
|
|
ret = msg_hash_to_str_tr(msg);
|
|
|
|
break;
|
2020-05-02 06:29:17 +00:00
|
|
|
case RETRO_LANGUAGE_SLOVAK:
|
|
|
|
ret = msg_hash_to_str_sk(msg);
|
|
|
|
break;
|
2020-06-04 11:54:28 +00:00
|
|
|
case RETRO_LANGUAGE_PERSIAN:
|
|
|
|
ret = msg_hash_to_str_fa(msg);
|
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_HEBREW:
|
|
|
|
ret = msg_hash_to_str_he(msg);
|
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_ASTURIAN:
|
|
|
|
ret = msg_hash_to_str_ast(msg);
|
|
|
|
break;
|
2020-12-12 17:02:14 +00:00
|
|
|
case RETRO_LANGUAGE_FINNISH:
|
|
|
|
ret = msg_hash_to_str_fi(msg);
|
|
|
|
break;
|
2022-01-19 18:12:55 +00:00
|
|
|
case RETRO_LANGUAGE_INDONESIAN:
|
|
|
|
ret = msg_hash_to_str_id(msg);
|
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_SWEDISH:
|
|
|
|
ret = msg_hash_to_str_sv(msg);
|
|
|
|
break;
|
|
|
|
case RETRO_LANGUAGE_UKRAINIAN:
|
|
|
|
ret = msg_hash_to_str_uk(msg);
|
|
|
|
break;
|
2022-03-07 18:11:39 +00:00
|
|
|
case RETRO_LANGUAGE_CZECH:
|
|
|
|
ret = msg_hash_to_str_cs(msg);
|
|
|
|
break;
|
2022-04-19 09:58:50 +00:00
|
|
|
case RETRO_LANGUAGE_CATALAN_VALENCIA:
|
2022-03-30 15:59:09 +00:00
|
|
|
ret = msg_hash_to_str_val(msg);
|
|
|
|
break;
|
2022-04-20 12:37:24 +00:00
|
|
|
case RETRO_LANGUAGE_CATALAN:
|
|
|
|
ret = msg_hash_to_str_ca(msg);
|
|
|
|
break;
|
2022-10-12 21:26:00 +00:00
|
|
|
case RETRO_LANGUAGE_BRITISH_ENGLISH:
|
|
|
|
ret = msg_hash_to_str_en(msg);
|
|
|
|
break;
|
2022-11-04 18:52:39 +00:00
|
|
|
case RETRO_LANGUAGE_HUNGARIAN:
|
|
|
|
ret = msg_hash_to_str_hu(msg);
|
|
|
|
break;
|
2023-10-31 12:51:57 +00:00
|
|
|
case RETRO_LANGUAGE_BELARUSIAN:
|
|
|
|
ret = msg_hash_to_str_be(msg);
|
|
|
|
break;
|
2015-06-30 23:42:04 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2016-06-07 04:05:41 +00:00
|
|
|
#endif
|
2015-06-30 23:42:04 +00:00
|
|
|
|
2017-05-30 21:50:02 +00:00
|
|
|
if (ret && !string_is_equal(ret, "null"))
|
2015-06-30 23:42:04 +00:00
|
|
|
return ret;
|
|
|
|
|
2016-06-14 13:04:49 +00:00
|
|
|
return msg_hash_to_str_us(msg);
|
2015-06-30 23:42:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t msg_hash_calculate(const char *s)
|
|
|
|
{
|
|
|
|
return djb2_calculate(s);
|
|
|
|
}
|
2016-06-20 04:44:05 +00:00
|
|
|
|
2016-06-20 13:53:57 +00:00
|
|
|
#define MENU_VALUE_FILE_WEBM 0x7ca00b50U
|
|
|
|
#define MENU_VALUE_FILE_F4F 0x0b886be5U
|
|
|
|
#define MENU_VALUE_FILE_F4V 0x0b886bf5U
|
|
|
|
#define MENU_VALUE_FILE_OGM 0x0b8898c8U
|
|
|
|
#define MENU_VALUE_FILE_MKV 0x0b8890d3U
|
|
|
|
#define MENU_VALUE_FILE_AVI 0x0b885f25U
|
|
|
|
#define MENU_VALUE_FILE_M4A 0x0b8889a7U
|
|
|
|
#define MENU_VALUE_FILE_3GP 0x0b87998fU
|
|
|
|
#define MENU_VALUE_FILE_MP4 0x0b889136U
|
|
|
|
#define MENU_VALUE_FILE_MP3 0x0b889135U
|
|
|
|
#define MENU_VALUE_FILE_FLAC 0x7c96d67bU
|
|
|
|
#define MENU_VALUE_FILE_OGG 0x0b8898c2U
|
2017-08-04 13:05:29 +00:00
|
|
|
#define MENU_VALUE_FILE_MOD 0x0b889145U
|
|
|
|
#define MENU_VALUE_FILE_S3M 0x0b88a318U
|
|
|
|
#define MENU_VALUE_FILE_XM 0x00597a2aU
|
2016-06-20 13:53:57 +00:00
|
|
|
#define MENU_VALUE_FILE_FLV 0x0b88732dU
|
|
|
|
#define MENU_VALUE_FILE_WAV 0x0b88ba13U
|
|
|
|
#define MENU_VALUE_FILE_MOV 0x0b889157U
|
|
|
|
#define MENU_VALUE_FILE_WMV 0x0b88bb9fU
|
2016-09-06 16:37:08 +00:00
|
|
|
#define MENU_VALUE_FILE_3G2 0x0b879951U
|
|
|
|
#define MENU_VALUE_FILE_MPG 0x0b889169U
|
|
|
|
#define MENU_VALUE_FILE_MPEG 0x7c9abeaeU
|
|
|
|
#define MENU_VALUE_FILE_VOB 0x0b88b78cU
|
|
|
|
#define MENU_VALUE_FILE_ASF 0x0b885ebfU
|
|
|
|
#define MENU_VALUE_FILE_DIVX 0x7c95b3c0U
|
|
|
|
#define MENU_VALUE_FILE_M2P 0x0b888974U
|
|
|
|
#define MENU_VALUE_FILE_M2TS 0x7c99b8ebU
|
|
|
|
#define MENU_VALUE_FILE_PS 0x00597928U
|
|
|
|
#define MENU_VALUE_FILE_TS 0x005979acU
|
|
|
|
#define MENU_VALUE_FILE_MXF 0x0b889270U
|
|
|
|
#define MENU_VALUE_FILE_WMA 0x0b88bb8aU
|
2016-06-20 13:53:57 +00:00
|
|
|
|
|
|
|
#define MENU_VALUE_FILE_JPG 0x0b8884a6U
|
|
|
|
#define MENU_VALUE_FILE_JPEG 0x7c99198bU
|
|
|
|
#define MENU_VALUE_FILE_JPG_CAPS 0x0b87f846U
|
|
|
|
#define MENU_VALUE_FILE_JPEG_CAPS 0x7c87010bU
|
|
|
|
#define MENU_VALUE_FILE_PNG 0x0b889deaU
|
|
|
|
#define MENU_VALUE_FILE_PNG_CAPS 0x0b88118aU
|
2019-01-05 23:33:29 +00:00
|
|
|
#define MENU_VALUE_FILE_GONG 0x7c977150U
|
|
|
|
#define MENU_VALUE_FILE_GONG_CAPS 0x7c8558d0U
|
2016-06-20 13:53:57 +00:00
|
|
|
#define MENU_VALUE_FILE_TGA 0x0b88ae01U
|
|
|
|
#define MENU_VALUE_FILE_BMP 0x0b886244U
|
|
|
|
|
|
|
|
#define MENU_VALUE_MD5 0x0b888fabU
|
|
|
|
#define MENU_VALUE_SHA1 0x7c9de632U
|
|
|
|
#define MENU_VALUE_CRC 0x0b88671dU
|
|
|
|
#define MENU_VALUE_MORE 0x0b877cafU
|
2016-12-18 16:26:02 +00:00
|
|
|
#define MENU_VALUE_CFILE 0xac3ec4f9U
|
2016-06-20 13:53:57 +00:00
|
|
|
#define MENU_VALUE_ON 0x005974c2U
|
|
|
|
#define MENU_VALUE_OFF 0x0b880c40U
|
|
|
|
#define MENU_VALUE_COMP 0x6a166ba5U
|
|
|
|
#define MENU_VALUE_MUSIC 0xc4a73997U
|
|
|
|
#define MENU_VALUE_IMAGE 0xbab7ebf9U
|
|
|
|
#define MENU_VALUE_MOVIE 0xc43c4bf6U
|
|
|
|
#define MENU_VALUE_CORE 0x6a167f7fU
|
|
|
|
#define MENU_VALUE_FILE 0x6a496536U
|
|
|
|
#define MENU_VALUE_RDB 0x0b00f54eU
|
|
|
|
#define MENU_VALUE_DIR 0x0af95f55U
|
|
|
|
#define MENU_VALUE_GLSLP 0x0f840c87U
|
|
|
|
#define MENU_VALUE_CGP 0x0b8865bfU
|
|
|
|
#define MENU_VALUE_GLSL 0x7c976537U
|
|
|
|
#define MENU_VALUE_HLSL 0x7c97f198U
|
|
|
|
#define MENU_VALUE_HLSLP 0x0f962508U
|
|
|
|
#define MENU_VALUE_CG 0x0059776fU
|
|
|
|
#define MENU_VALUE_SLANG 0x105ce63aU
|
|
|
|
#define MENU_VALUE_SLANGP 0x1bf9adeaU
|
|
|
|
|
2016-06-20 16:48:30 +00:00
|
|
|
#define FILE_HASH_APK 0x0b885e61U
|
|
|
|
|
2016-09-18 04:38:59 +00:00
|
|
|
#define HASH_EXTENSION_7Z 0x005971d6U
|
|
|
|
#define HASH_EXTENSION_7Z_UPP 0x005971b6U
|
2016-06-20 16:48:30 +00:00
|
|
|
#define HASH_EXTENSION_ZIP 0x0b88c7d8U
|
|
|
|
#define HASH_EXTENSION_ZIP_UPP 0x0b883b78U
|
|
|
|
#define HASH_EXTENSION_CUE 0x0b886782U
|
|
|
|
#define HASH_EXTENSION_CUE_UPPERCASE 0x0b87db22U
|
2017-09-18 00:40:04 +00:00
|
|
|
#define HASH_EXTENSION_GDI 0x00b887659
|
|
|
|
#define HASH_EXTENSION_GDI_UPPERCASE 0x00b87e9f9
|
2016-06-20 16:48:30 +00:00
|
|
|
#define HASH_EXTENSION_ISO 0x0b8880d0U
|
|
|
|
#define HASH_EXTENSION_ISO_UPPERCASE 0x0b87f470U
|
2016-06-29 13:07:12 +00:00
|
|
|
#define HASH_EXTENSION_LUTRO 0x0fe37b7bU
|
2017-09-17 05:30:47 +00:00
|
|
|
#define HASH_EXTENSION_CHD 0x0b8865d4U
|
2016-06-20 15:55:34 +00:00
|
|
|
|
2016-06-28 10:19:18 +00:00
|
|
|
enum msg_file_type msg_hash_to_file_type(uint32_t hash)
|
2016-06-20 04:44:05 +00:00
|
|
|
{
|
|
|
|
switch (hash)
|
|
|
|
{
|
|
|
|
case MENU_VALUE_COMP:
|
2016-09-18 04:38:59 +00:00
|
|
|
case HASH_EXTENSION_7Z:
|
|
|
|
case HASH_EXTENSION_7Z_UPP:
|
2016-06-20 16:48:30 +00:00
|
|
|
case HASH_EXTENSION_ZIP:
|
|
|
|
case HASH_EXTENSION_ZIP_UPP:
|
2016-06-20 13:21:42 +00:00
|
|
|
case FILE_HASH_APK:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_COMPRESSED;
|
2016-12-18 16:26:02 +00:00
|
|
|
case MENU_VALUE_CFILE:
|
|
|
|
return FILE_TYPE_IN_CARCHIVE;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_MORE:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_MORE;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_CORE:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_CORE;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_RDB:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_RDB;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_PLAIN;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_DIR:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_DIRECTORY;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_MUSIC:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_MUSIC;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_IMAGE:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_IMAGE;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_MOVIE:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_MOVIE;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_ON:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_BOOL_ON;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_OFF:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_BOOL_OFF;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_GLSL:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_SHADER_GLSL;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_HLSL:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_SHADER_HLSL;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_CG:
|
2016-06-20 19:54:06 +00:00
|
|
|
return FILE_TYPE_SHADER_CG;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_SLANG:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_SHADER_SLANG;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_GLSLP:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_SHADER_PRESET_GLSLP;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_HLSLP:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_SHADER_PRESET_HLSLP;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_CGP:
|
2016-06-20 19:54:06 +00:00
|
|
|
return FILE_TYPE_SHADER_PRESET_CGP;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_SLANGP:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_SHADER_PRESET_SLANGP;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_CRC:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_CRC;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_SHA1:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_SHA1;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_MD5:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_MD5;
|
2018-06-20 02:50:58 +00:00
|
|
|
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_OGM:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_OGM;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_MKV:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_MKV;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_AVI:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_AVI;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_MP4:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_MP4;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_FLV:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_FLV;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_WEBM:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_WEBM;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_3GP:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_3GP;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_F4F:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_F4F;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_F4V:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_F4V;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_MOV:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_MOV;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_WMV:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_WMV;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_M4A:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_M4A;
|
2016-09-06 16:37:08 +00:00
|
|
|
case MENU_VALUE_FILE_3G2:
|
|
|
|
return FILE_TYPE_3G2;
|
|
|
|
case MENU_VALUE_FILE_MPG:
|
|
|
|
return FILE_TYPE_MPG;
|
|
|
|
case MENU_VALUE_FILE_MPEG:
|
|
|
|
return FILE_TYPE_MPEG;
|
|
|
|
case MENU_VALUE_FILE_VOB:
|
|
|
|
return FILE_TYPE_VOB;
|
|
|
|
case MENU_VALUE_FILE_ASF:
|
|
|
|
return FILE_TYPE_ASF;
|
|
|
|
case MENU_VALUE_FILE_DIVX:
|
|
|
|
return FILE_TYPE_DIVX;
|
|
|
|
case MENU_VALUE_FILE_M2P:
|
|
|
|
return FILE_TYPE_M2P;
|
|
|
|
case MENU_VALUE_FILE_M2TS:
|
|
|
|
return FILE_TYPE_M2TS;
|
|
|
|
case MENU_VALUE_FILE_PS:
|
|
|
|
return FILE_TYPE_PS;
|
|
|
|
case MENU_VALUE_FILE_TS:
|
|
|
|
return FILE_TYPE_TS;
|
|
|
|
case MENU_VALUE_FILE_MXF:
|
|
|
|
return FILE_TYPE_MXF;
|
|
|
|
case MENU_VALUE_FILE_WMA:
|
|
|
|
return FILE_TYPE_WMA;
|
2016-06-20 04:44:05 +00:00
|
|
|
#endif
|
2023-11-05 23:32:14 +00:00
|
|
|
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV) || defined(HAVE_AUDIOMIXER)
|
|
|
|
#if !defined(HAVE_AUDIOMIXER) || defined(HAVE_DR_MP3)
|
|
|
|
case MENU_VALUE_FILE_MP3:
|
|
|
|
return FILE_TYPE_MP3;
|
|
|
|
#endif
|
|
|
|
#if !defined(HAVE_AUDIOMIXER) || defined(HAVE_STB_VORBIS)
|
|
|
|
case MENU_VALUE_FILE_OGG:
|
|
|
|
return FILE_TYPE_OGG;
|
|
|
|
#endif
|
|
|
|
#if !defined(HAVE_AUDIOMIXER) || defined(HAVE_DR_FLAC)
|
|
|
|
case MENU_VALUE_FILE_FLAC:
|
|
|
|
return FILE_TYPE_FLAC;
|
|
|
|
#endif
|
|
|
|
#if !defined(HAVE_AUDIOMIXER) || defined(HAVE_RWAV)
|
|
|
|
case MENU_VALUE_FILE_WAV:
|
|
|
|
return FILE_TYPE_WAV;
|
|
|
|
#endif
|
|
|
|
#if !defined(HAVE_AUDIOMIXER) || defined(HAVE_IBXM)
|
2017-08-04 13:05:29 +00:00
|
|
|
case MENU_VALUE_FILE_MOD:
|
|
|
|
return FILE_TYPE_MOD;
|
|
|
|
case MENU_VALUE_FILE_S3M:
|
|
|
|
return FILE_TYPE_S3M;
|
|
|
|
case MENU_VALUE_FILE_XM:
|
|
|
|
return FILE_TYPE_XM;
|
|
|
|
#endif
|
2023-11-05 23:32:14 +00:00
|
|
|
#endif
|
2016-06-20 04:44:05 +00:00
|
|
|
#ifdef HAVE_IMAGEVIEWER
|
|
|
|
case MENU_VALUE_FILE_JPG:
|
|
|
|
case MENU_VALUE_FILE_JPG_CAPS:
|
|
|
|
case MENU_VALUE_FILE_JPEG:
|
|
|
|
case MENU_VALUE_FILE_JPEG_CAPS:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_JPEG;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_PNG:
|
|
|
|
case MENU_VALUE_FILE_PNG_CAPS:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_PNG;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_TGA:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_TGA;
|
2016-06-20 04:44:05 +00:00
|
|
|
case MENU_VALUE_FILE_BMP:
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_BMP;
|
2019-01-05 23:33:29 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_EASTEREGG
|
|
|
|
case MENU_VALUE_FILE_GONG:
|
|
|
|
case MENU_VALUE_FILE_GONG_CAPS:
|
|
|
|
return FILE_TYPE_GONG;
|
2016-06-20 04:44:05 +00:00
|
|
|
#endif
|
2016-06-20 15:55:34 +00:00
|
|
|
case HASH_EXTENSION_CUE:
|
|
|
|
case HASH_EXTENSION_CUE_UPPERCASE:
|
|
|
|
return FILE_TYPE_CUE;
|
2017-09-18 00:40:04 +00:00
|
|
|
case HASH_EXTENSION_GDI:
|
|
|
|
case HASH_EXTENSION_GDI_UPPERCASE:
|
|
|
|
return FILE_TYPE_GDI;
|
2016-06-20 15:55:34 +00:00
|
|
|
case HASH_EXTENSION_ISO:
|
|
|
|
case HASH_EXTENSION_ISO_UPPERCASE:
|
|
|
|
return FILE_TYPE_ISO;
|
2016-06-29 13:07:12 +00:00
|
|
|
case HASH_EXTENSION_LUTRO:
|
|
|
|
return FILE_TYPE_LUTRO;
|
2017-09-17 05:30:47 +00:00
|
|
|
case HASH_EXTENSION_CHD:
|
|
|
|
return FILE_TYPE_CHD;
|
2016-06-20 04:44:05 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2016-06-20 13:50:37 +00:00
|
|
|
return FILE_TYPE_NONE;
|
2016-06-20 04:44:05 +00:00
|
|
|
}
|
2017-05-15 18:41:04 +00:00
|
|
|
|
|
|
|
unsigned *msg_hash_get_uint(enum msg_hash_action type)
|
|
|
|
{
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case MSG_HASH_USER_LANGUAGE:
|
|
|
|
return &uint_user_language;
|
|
|
|
case MSG_HASH_NONE:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void msg_hash_set_uint(enum msg_hash_action type, unsigned val)
|
|
|
|
{
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case MSG_HASH_USER_LANGUAGE:
|
|
|
|
uint_user_language = val;
|
|
|
|
break;
|
|
|
|
case MSG_HASH_NONE:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2021-05-25 07:54:01 +00:00
|
|
|
|
|
|
|
const char *msg_hash_get_wideglyph_str(void)
|
|
|
|
{
|
2021-06-04 18:50:21 +00:00
|
|
|
#ifdef HAVE_LANGEXTRA
|
2021-05-25 07:54:01 +00:00
|
|
|
switch (uint_user_language)
|
|
|
|
{
|
|
|
|
case RETRO_LANGUAGE_CHINESE_SIMPLIFIED:
|
2023-08-12 12:46:35 +00:00
|
|
|
return "菜";
|
2021-05-25 07:54:01 +00:00
|
|
|
case RETRO_LANGUAGE_CHINESE_TRADITIONAL:
|
2023-08-12 12:46:35 +00:00
|
|
|
return "主";
|
2021-05-25 07:54:01 +00:00
|
|
|
case RETRO_LANGUAGE_JAPANESE:
|
2023-08-12 12:46:35 +00:00
|
|
|
return "漢";
|
2021-05-25 07:54:01 +00:00
|
|
|
case RETRO_LANGUAGE_KOREAN:
|
2023-08-12 12:46:35 +00:00
|
|
|
return "메";
|
2021-05-25 07:54:01 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2021-06-04 18:50:21 +00:00
|
|
|
#endif
|
2021-05-25 07:54:01 +00:00
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|