mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-20 11:30:37 +00:00
Create msg_hash_* files
This commit is contained in:
parent
0e37f409d5
commit
8a5145a514
@ -113,6 +113,15 @@ OBJ += frontend/frontend.o \
|
||||
system.o \
|
||||
retroarch_info.o \
|
||||
command_event.o \
|
||||
msg_hash.o \
|
||||
intl/msg_hash_de.o \
|
||||
intl/msg_hash_eo.o \
|
||||
intl/msg_hash_es.o \
|
||||
intl/msg_hash_fr.o \
|
||||
intl/msg_hash_it.o \
|
||||
intl/msg_hash_nl.o \
|
||||
intl/msg_hash_pt.o \
|
||||
intl/msg_hash_us.o \
|
||||
runloop.o \
|
||||
runloop_data.o \
|
||||
runloop_msg.o \
|
||||
|
@ -671,6 +671,16 @@ RETROARCH
|
||||
#include "../runloop_msg.c"
|
||||
#include "../system.c"
|
||||
|
||||
#include "../msg_hash.c"
|
||||
#include "../intl/msg_hash_de.c"
|
||||
#include "../intl/msg_hash_es.c"
|
||||
#include "../intl/msg_hash_eo.c"
|
||||
#include "../intl/msg_hash_fr.c"
|
||||
#include "../intl/msg_hash_it.c"
|
||||
#include "../intl/msg_hash_nl.c"
|
||||
#include "../intl/msg_hash_pt.c"
|
||||
#include "../intl/msg_hash_us.c"
|
||||
|
||||
|
||||
/*============================================================
|
||||
RECORDING
|
||||
|
29
intl/msg_hash_de.c
Normal file
29
intl/msg_hash_de.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../msg_hash.h"
|
||||
|
||||
const char *msg_hash_to_str_de(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
29
intl/msg_hash_eo.c
Normal file
29
intl/msg_hash_eo.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../msg_hash.h"
|
||||
|
||||
const char *msg_hash_to_str_eo(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
29
intl/msg_hash_es.c
Normal file
29
intl/msg_hash_es.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../msg_hash.h"
|
||||
|
||||
const char *msg_hash_to_str_es(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
29
intl/msg_hash_fr.c
Normal file
29
intl/msg_hash_fr.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../msg_hash.h"
|
||||
|
||||
const char *msg_hash_to_str_fr(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
29
intl/msg_hash_it.c
Normal file
29
intl/msg_hash_it.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../msg_hash.h"
|
||||
|
||||
const char *msg_hash_to_str_it(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
29
intl/msg_hash_nl.c
Normal file
29
intl/msg_hash_nl.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../msg_hash.h"
|
||||
|
||||
const char *msg_hash_to_str_nl(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
29
intl/msg_hash_pt.c
Normal file
29
intl/msg_hash_pt.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../msg_hash.h"
|
||||
|
||||
const char *msg_hash_to_str_pt(uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
66
msg_hash.c
Normal file
66
msg_hash.c
Normal file
@ -0,0 +1,66 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2015 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include <rhash.h>
|
||||
|
||||
#include "msg_hash.h"
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
const char *msg_hash_to_str(uint32_t hash)
|
||||
{
|
||||
const char *ret = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings)
|
||||
return "null";
|
||||
|
||||
switch (settings->user_language)
|
||||
{
|
||||
case RETRO_LANGUAGE_FRENCH:
|
||||
ret = msg_hash_to_str_fr(hash);
|
||||
break;
|
||||
case RETRO_LANGUAGE_GERMAN:
|
||||
ret = msg_hash_to_str_de(hash);
|
||||
break;
|
||||
case RETRO_LANGUAGE_SPANISH:
|
||||
ret = msg_hash_to_str_es(hash);
|
||||
break;
|
||||
case RETRO_LANGUAGE_ITALIAN:
|
||||
ret = msg_hash_to_str_it(hash);
|
||||
break;
|
||||
case RETRO_LANGUAGE_PORTUGUESE:
|
||||
ret = msg_hash_to_str_pt(hash);
|
||||
break;
|
||||
case RETRO_LANGUAGE_DUTCH:
|
||||
ret = msg_hash_to_str_nl(hash);
|
||||
break;
|
||||
case RETRO_LANGUAGE_ESPERANTO:
|
||||
ret = msg_hash_to_str_eo(hash);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret && strcmp(ret, "null") != 0)
|
||||
return ret;
|
||||
|
||||
return msg_hash_to_str_us(hash);
|
||||
}
|
||||
|
||||
uint32_t msg_hash_calculate(const char *s)
|
||||
{
|
||||
return djb2_calculate(s);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user