mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 10:20:51 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
341b5024fb
@ -112,7 +112,7 @@ OBJ += frontend/frontend.o \
|
||||
libretro-common/file//nbio/nbio_stdio.o \
|
||||
libretro-common/file/file_path.o \
|
||||
file_path_special.o \
|
||||
hash.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
audio/audio_driver.o \
|
||||
input/input_driver.o \
|
||||
input/input_hid_driver.o \
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "movie.h"
|
||||
#include "patch.h"
|
||||
#include "compat/strl.h"
|
||||
#include "hash.h"
|
||||
#include <rhash.h>
|
||||
#include <file/file_extract.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
201
database_info.c
201
database_info.c
@ -15,12 +15,13 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <file/file_extract.h>
|
||||
#include <rhash.h>
|
||||
|
||||
#include "file_ext.h"
|
||||
#include "dir_list_special.h"
|
||||
#include <file/file_extract.h>
|
||||
|
||||
#include "database_info.h"
|
||||
#include "hash.h"
|
||||
#include "file_ops.h"
|
||||
#include "general.h"
|
||||
#include "runloop.h"
|
||||
@ -49,6 +50,31 @@
|
||||
#define DB_QUERY_ENTRY_RELEASEDATE_YEAR 0x9c7c6e91U
|
||||
#define DB_QUERY_ENTRY_MAX_USERS 0xbfcba816U
|
||||
|
||||
#define DB_CURSOR_NAME 0x7c9b0c46U
|
||||
#define DB_CURSOR_DESCRIPTION 0x91b0c789U
|
||||
#define DB_CURSOR_PUBLISHER 0x5e099013U
|
||||
#define DB_CURSOR_DEVELOPER 0x1783d2abU
|
||||
#define DB_CURSOR_ORIGIN 0x1315e3edU
|
||||
#define DB_CURSOR_FRANCHISE 0xc3a526b8U
|
||||
#define DB_CURSOR_BBFC_RATING 0xede26836U
|
||||
#define DB_CURSOR_ESRB_RATING 0x4c3fa255U
|
||||
#define DB_CURSOR_ELSPA_RATING 0xd9cab41eU
|
||||
#define DB_CURSOR_CERO_RATING 0x084a1772U
|
||||
#define DB_CURSOR_PEGI_RATING 0x431b736eU
|
||||
#define DB_CURSOR_CHECKSUM_CRC32 0x0b88671dU
|
||||
#define DB_CURSOR_CHECKSUM_SHA1 0x7c9de632U
|
||||
#define DB_CURSOR_CHECKSUM_MD5 0x0b888fabU
|
||||
#define DB_CURSOR_ENHANCEMENT_HW 0xab612029U
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_REVIEW 0xd3573eabU
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_RATING 0xd30dc4feU
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_ISSUE 0xa0f30d42U
|
||||
#define DB_CURSOR_FAMITSU_MAGAZINE_RATING 0x0a50ca62U
|
||||
#define DB_CURSOR_MAX_USERS 0x1084ff77U
|
||||
#define DB_CURSOR_RELEASEDATE_MONTH 0x790ad76cU
|
||||
#define DB_CURSOR_RELEASEDATE_YEAR 0x7fd06ed7U
|
||||
#define DB_CURSOR_RUMBLE_SUPPORTED 0x1a4dc3ecU
|
||||
#define DB_CURSOR_ANALOG_SUPPORTED 0xf220fc17U
|
||||
|
||||
int database_info_build_query(char *s, size_t len,
|
||||
const char *label, const char *path)
|
||||
{
|
||||
@ -62,90 +88,61 @@ int database_info_build_query(char *s, size_t len,
|
||||
switch (value)
|
||||
{
|
||||
case DB_QUERY_ENTRY:
|
||||
if (!strcmp(label, "displaylist_parse_database_entry"))
|
||||
strlcat(s, "name", len);
|
||||
strlcat(s, "name", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_PUBLISHER:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_publisher"))
|
||||
strlcat(s, "publisher", len);
|
||||
strlcat(s, "publisher", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_DEVELOPER:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_developer"))
|
||||
strlcat(s, "developer", len);
|
||||
strlcat(s, "developer", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_ORIGIN:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_origin"))
|
||||
strlcat(s, "origin", len);
|
||||
strlcat(s, "origin", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_FRANCHISE:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_franchise"))
|
||||
strlcat(s, "franchise", len);
|
||||
strlcat(s, "franchise", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_esrb_rating"))
|
||||
strlcat(s, "esrb_rating", len);
|
||||
strlcat(s, "esrb_rating", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_BBFC_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_bbfc_rating"))
|
||||
strlcat(s, "bbfc_rating", len);
|
||||
strlcat(s, "bbfc_rating", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_ELSPA_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_elspa_rating"))
|
||||
strlcat(s, "elspa_rating", len);
|
||||
strlcat(s, "elspa_rating", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_PEGI_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_pegi_rating"))
|
||||
strlcat(s, "pegi_rating", len);
|
||||
strlcat(s, "pegi_rating", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_CERO_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_cero_rating"))
|
||||
strlcat(s, "cero_rating", len);
|
||||
strlcat(s, "cero_rating", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_ENHANCEMENT_HW:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_enhancement_hw"))
|
||||
strlcat(s, "enhancement_hw", len);
|
||||
strlcat(s, "enhancement_hw", len);
|
||||
break;
|
||||
case DB_QUERY_ENTRY_EDGE_MAGAZINE_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_edge_magazine_rating"))
|
||||
{
|
||||
strlcat(s, "edge_rating", len);
|
||||
add_quotes = false;
|
||||
}
|
||||
strlcat(s, "edge_rating", len);
|
||||
add_quotes = false;
|
||||
break;
|
||||
case DB_QUERY_ENTRY_EDGE_MAGAZINE_ISSUE:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_edge_magazine_issue"))
|
||||
{
|
||||
strlcat(s, "edge_issue", len);
|
||||
add_quotes = false;
|
||||
}
|
||||
strlcat(s, "edge_issue", len);
|
||||
add_quotes = false;
|
||||
break;
|
||||
case DB_QUERY_ENTRY_FAMITSU_MAGAZINE_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_famitsu_magazine_rating"))
|
||||
{
|
||||
strlcat(s, "famitsu_rating", len);
|
||||
add_quotes = false;
|
||||
}
|
||||
strlcat(s, "famitsu_rating", len);
|
||||
add_quotes = false;
|
||||
break;
|
||||
case DB_QUERY_ENTRY_RELEASEDATE_MONTH:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_releasemonth"))
|
||||
{
|
||||
strlcat(s, "releasemonth", len);
|
||||
add_quotes = false;
|
||||
}
|
||||
strlcat(s, "releasemonth", len);
|
||||
add_quotes = false;
|
||||
break;
|
||||
case DB_QUERY_ENTRY_RELEASEDATE_YEAR:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_releaseyear"))
|
||||
{
|
||||
strlcat(s, "releaseyear", len);
|
||||
add_quotes = false;
|
||||
}
|
||||
strlcat(s, "releaseyear", len);
|
||||
add_quotes = false;
|
||||
break;
|
||||
case DB_QUERY_ENTRY_MAX_USERS:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_max_users"))
|
||||
{
|
||||
strlcat(s, "users", len);
|
||||
add_quotes = false;
|
||||
}
|
||||
strlcat(s, "users", len);
|
||||
add_quotes = false;
|
||||
break;
|
||||
default:
|
||||
RARCH_LOG("Unknown label: %s\n", label);
|
||||
@ -179,30 +176,6 @@ static char *bin_to_hex_alloc(const uint8_t *data, size_t len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define DB_CURSOR_NAME 0x7c9b0c46U
|
||||
#define DB_CURSOR_DESCRIPTION 0x91b0c789U
|
||||
#define DB_CURSOR_PUBLISHER 0x5e099013U
|
||||
#define DB_CURSOR_DEVELOPER 0x1783d2abU
|
||||
#define DB_CURSOR_ORIGIN 0x1315e3edU
|
||||
#define DB_CURSOR_FRANCHISE 0xc3a526b8U
|
||||
#define DB_CURSOR_BBFC_RATING 0xede26836U
|
||||
#define DB_CURSOR_ESRB_RATING 0x4c3fa255U
|
||||
#define DB_CURSOR_ELSPA_RATING 0xd9cab41eU
|
||||
#define DB_CURSOR_CERO_RATING 0x084a1772U
|
||||
#define DB_CURSOR_PEGI_RATING 0x431b736eU
|
||||
#define DB_CURSOR_CHECKSUM_CRC32 0x0b88671dU
|
||||
#define DB_CURSOR_CHECKSUM_SHA1 0x7c9de632U
|
||||
#define DB_CURSOR_CHECKSUM_MD5 0x0b888fabU
|
||||
#define DB_CURSOR_ENHANCEMENT_HW 0xab612029U
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_REVIEW 0xd3573eabU
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_RATING 0xd30dc4feU
|
||||
#define DB_CURSOR_EDGE_MAGAZINE_ISSUE 0xa0f30d42U
|
||||
#define DB_CURSOR_FAMITSU_MAGAZINE_RATING 0x0a50ca62U
|
||||
#define DB_CURSOR_MAX_USERS 0x1084ff77U
|
||||
#define DB_CURSOR_RELEASEDATE_MONTH 0x790ad76cU
|
||||
#define DB_CURSOR_RELEASEDATE_YEAR 0x7fd06ed7U
|
||||
#define DB_CURSOR_RUMBLE_SUPPORTED 0x1a4dc3ecU
|
||||
#define DB_CURSOR_ANALOG_SUPPORTED 0xf220fc17U
|
||||
|
||||
static int database_cursor_iterate(libretrodb_cursor_t *cur,
|
||||
database_info_t *db_info)
|
||||
@ -238,100 +211,76 @@ static int database_cursor_iterate(libretrodb_cursor_t *cur,
|
||||
switch (value)
|
||||
{
|
||||
case DB_CURSOR_NAME:
|
||||
if (!strcmp(str, "name"))
|
||||
db_info->name = strdup(val->string.buff);
|
||||
db_info->name = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_DESCRIPTION:
|
||||
if (!strcmp(str, "description"))
|
||||
db_info->description = strdup(val->string.buff);
|
||||
db_info->description = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_PUBLISHER:
|
||||
if (!strcmp(str, "publisher"))
|
||||
db_info->publisher = strdup(val->string.buff);
|
||||
db_info->publisher = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_DEVELOPER:
|
||||
if (!strcmp(str, "developer"))
|
||||
db_info->developer = strdup(val->string.buff);
|
||||
db_info->developer = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_ORIGIN:
|
||||
if (!strcmp(str, "origin"))
|
||||
db_info->origin = strdup(val->string.buff);
|
||||
db_info->origin = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_FRANCHISE:
|
||||
if (!strcmp(str, "franchise"))
|
||||
db_info->franchise = strdup(val->string.buff);
|
||||
db_info->franchise = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_BBFC_RATING:
|
||||
if (!strcmp(str, "bbfc_rating"))
|
||||
db_info->bbfc_rating = strdup(val->string.buff);
|
||||
db_info->bbfc_rating = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_ESRB_RATING:
|
||||
if (!strcmp(str, "esrb_rating"))
|
||||
db_info->esrb_rating = strdup(val->string.buff);
|
||||
db_info->esrb_rating = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_ELSPA_RATING:
|
||||
if (!strcmp(str, "elspa_rating"))
|
||||
db_info->elspa_rating = strdup(val->string.buff);
|
||||
db_info->elspa_rating = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_CERO_RATING:
|
||||
if (!strcmp(str, "cero_rating"))
|
||||
db_info->cero_rating = strdup(val->string.buff);
|
||||
db_info->cero_rating = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_PEGI_RATING:
|
||||
if (!strcmp(str, "pegi_rating"))
|
||||
db_info->pegi_rating = strdup(val->string.buff);
|
||||
db_info->pegi_rating = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_ENHANCEMENT_HW:
|
||||
if (!strcmp(str, "enhancement_hw"))
|
||||
db_info->enhancement_hw = strdup(val->string.buff);
|
||||
db_info->enhancement_hw = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_EDGE_MAGAZINE_REVIEW:
|
||||
if (!strcmp(str, "edge_review"))
|
||||
db_info->edge_magazine_review = strdup(val->string.buff);
|
||||
db_info->edge_magazine_review = strdup(val->string.buff);
|
||||
break;
|
||||
case DB_CURSOR_EDGE_MAGAZINE_RATING:
|
||||
if (!strcmp(str, "edge_rating"))
|
||||
db_info->edge_magazine_rating = val->uint_;
|
||||
db_info->edge_magazine_rating = val->uint_;
|
||||
break;
|
||||
case DB_CURSOR_EDGE_MAGAZINE_ISSUE:
|
||||
if (!strcmp(str, "edge_issue"))
|
||||
db_info->edge_magazine_issue = val->uint_;
|
||||
db_info->edge_magazine_issue = val->uint_;
|
||||
break;
|
||||
case DB_CURSOR_FAMITSU_MAGAZINE_RATING:
|
||||
if (!strcmp(str, "famitsu_rating"))
|
||||
db_info->famitsu_magazine_rating = val->uint_;
|
||||
db_info->famitsu_magazine_rating = val->uint_;
|
||||
break;
|
||||
case DB_CURSOR_MAX_USERS:
|
||||
if (!strcmp(str, "users"))
|
||||
db_info->max_users = val->uint_;
|
||||
db_info->max_users = val->uint_;
|
||||
break;
|
||||
case DB_CURSOR_RELEASEDATE_MONTH:
|
||||
if (!strcmp(str, "releasemonth"))
|
||||
db_info->releasemonth = val->uint_;
|
||||
db_info->releasemonth = val->uint_;
|
||||
break;
|
||||
case DB_CURSOR_RELEASEDATE_YEAR:
|
||||
if (!strcmp(str, "releaseyear"))
|
||||
db_info->releaseyear = val->uint_;
|
||||
db_info->releaseyear = val->uint_;
|
||||
break;
|
||||
case DB_CURSOR_RUMBLE_SUPPORTED:
|
||||
if (!strcmp(str, "rumble"))
|
||||
db_info->rumble_supported = val->uint_;
|
||||
db_info->rumble_supported = val->uint_;
|
||||
break;
|
||||
case DB_CURSOR_ANALOG_SUPPORTED:
|
||||
if (!strcmp(str, "analog"))
|
||||
db_info->analog_supported = val->uint_;
|
||||
db_info->analog_supported = val->uint_;
|
||||
break;
|
||||
case DB_CURSOR_CHECKSUM_CRC32:
|
||||
if (!strcmp(str, "crc"))
|
||||
db_info->crc32 = bin_to_hex_alloc((uint8_t*)val->binary.buff, val->binary.len);
|
||||
db_info->crc32 = bin_to_hex_alloc((uint8_t*)val->binary.buff, val->binary.len);
|
||||
break;
|
||||
case DB_CURSOR_CHECKSUM_SHA1:
|
||||
if (!strcmp(str, "sha1"))
|
||||
db_info->sha1 = bin_to_hex_alloc((uint8_t*)val->binary.buff, val->binary.len);
|
||||
db_info->sha1 = bin_to_hex_alloc((uint8_t*)val->binary.buff, val->binary.len);
|
||||
break;
|
||||
case DB_CURSOR_CHECKSUM_MD5:
|
||||
if (!strcmp(str, "md5"))
|
||||
db_info->md5 = bin_to_hex_alloc((uint8_t*)val->binary.buff, val->binary.len);
|
||||
db_info->md5 = bin_to_hex_alloc((uint8_t*)val->binary.buff, val->binary.len);
|
||||
break;
|
||||
default:
|
||||
RARCH_LOG("Unknown value: %d\n", value);
|
||||
|
110
driver.c
110
driver.c
@ -14,6 +14,8 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <rhash.h>
|
||||
|
||||
#include "driver.h"
|
||||
#include "general.h"
|
||||
#include "retroarch.h"
|
||||
@ -60,6 +62,15 @@ driver_t *driver_get_ptr(void)
|
||||
return g_driver;
|
||||
}
|
||||
|
||||
#define HASH_LOCATION_DRIVER 0x09189689U
|
||||
#define HASH_CAMERA_DRIVER 0xf25db959U
|
||||
#define HASH_MENU_DRIVER 0xd607fb05U
|
||||
#define HASH_INPUT_DRIVER 0x4c087840U
|
||||
#define HASH_INPUT_JOYPAD_DRIVER 0xab124146U
|
||||
#define HASH_VIDEO_DRIVER 0x1805a5e7U
|
||||
#define HASH_AUDIO_DRIVER 0x26594002U
|
||||
#define HASH_AUDIO_RESAMPLER_DRIVER 0xedcba9ecU
|
||||
#define HASH_RECORD_DRIVER 0x144cd2cfU
|
||||
/**
|
||||
* find_driver_nonempty:
|
||||
* @label : string of driver type to be found.
|
||||
@ -77,62 +88,57 @@ static const void *find_driver_nonempty(const char *label, int i,
|
||||
char *s, size_t len)
|
||||
{
|
||||
const void *drv = NULL;
|
||||
uint32_t hash = djb2_calculate(label);
|
||||
|
||||
if (!strcmp(label, "camera_driver"))
|
||||
switch (hash)
|
||||
{
|
||||
drv = camera_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, camera_driver_find_ident(i), len);
|
||||
}
|
||||
else if (!strcmp(label, "location_driver"))
|
||||
{
|
||||
drv = location_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, location_driver_find_ident(i), len);
|
||||
}
|
||||
case HASH_CAMERA_DRIVER:
|
||||
drv = camera_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, camera_driver_find_ident(i), len);
|
||||
break;
|
||||
case HASH_LOCATION_DRIVER:
|
||||
drv = location_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, location_driver_find_ident(i), len);
|
||||
break;
|
||||
case HASH_MENU_DRIVER:
|
||||
#ifdef HAVE_MENU
|
||||
else if (!strcmp(label, "menu_driver"))
|
||||
{
|
||||
drv = menu_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, menu_driver_find_ident(i), len);
|
||||
}
|
||||
drv = menu_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, menu_driver_find_ident(i), len);
|
||||
#endif
|
||||
else if (!strcmp(label, "input_driver"))
|
||||
{
|
||||
drv = input_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, input_driver_find_ident(i), len);
|
||||
}
|
||||
else if (!strcmp(label, "input_joypad_driver"))
|
||||
{
|
||||
drv = joypad_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, joypad_driver_find_ident(i), len);
|
||||
}
|
||||
else if (!strcmp(label, "video_driver"))
|
||||
{
|
||||
drv = video_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, video_driver_find_ident(i), len);
|
||||
}
|
||||
else if (!strcmp(label, "audio_driver"))
|
||||
{
|
||||
drv = audio_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, audio_driver_find_ident(i), len);
|
||||
}
|
||||
else if (!strcmp(label, "record_driver"))
|
||||
{
|
||||
drv = record_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, record_driver_find_ident(i), len);
|
||||
}
|
||||
else if (!strcmp(label, "audio_resampler_driver"))
|
||||
{
|
||||
drv = audio_resampler_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, audio_resampler_driver_find_ident(i), len);
|
||||
break;
|
||||
case HASH_INPUT_DRIVER:
|
||||
drv = input_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, input_driver_find_ident(i), len);
|
||||
break;
|
||||
case HASH_INPUT_JOYPAD_DRIVER:
|
||||
drv = joypad_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, joypad_driver_find_ident(i), len);
|
||||
break;
|
||||
case HASH_VIDEO_DRIVER:
|
||||
drv = video_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, video_driver_find_ident(i), len);
|
||||
break;
|
||||
case HASH_AUDIO_DRIVER:
|
||||
drv = audio_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, audio_driver_find_ident(i), len);
|
||||
break;
|
||||
case HASH_RECORD_DRIVER:
|
||||
drv = record_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, record_driver_find_ident(i), len);
|
||||
break;
|
||||
case HASH_AUDIO_RESAMPLER_DRIVER:
|
||||
drv = audio_resampler_driver_find_handle(i);
|
||||
if (drv)
|
||||
strlcpy(s, audio_resampler_driver_find_ident(i), len);
|
||||
break;
|
||||
}
|
||||
|
||||
return drv;
|
||||
|
@ -81,7 +81,7 @@ CONFIG FILE
|
||||
CHEATS
|
||||
============================================================ */
|
||||
#include "../cheats.c"
|
||||
#include "../hash.c"
|
||||
#include "../libretro-common/hash/rhash.c"
|
||||
|
||||
/*============================================================
|
||||
UI COMMON CONTEXT
|
||||
|
@ -1,17 +1,23 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2010-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.
|
||||
/* Copyright (C) 2010-2015 The RetroArch team
|
||||
*
|
||||
* 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.
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rhash.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -22,7 +28,7 @@
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "hash.h"
|
||||
#include <rhash.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <retro_endianness.h>
|
||||
|
||||
@ -109,20 +115,23 @@ static void sha256_block(struct sha256_ctx *p)
|
||||
p->inlen = 0;
|
||||
}
|
||||
|
||||
static void sha256_chunk(struct sha256_ctx *p, const uint8_t *s, unsigned len)
|
||||
static void sha256_chunk(struct sha256_ctx *p,
|
||||
const uint8_t *s, unsigned len)
|
||||
{
|
||||
unsigned l;
|
||||
|
||||
p->len += len;
|
||||
|
||||
while (len)
|
||||
{
|
||||
l = 64 - p->inlen;
|
||||
l = (len < l) ? len : l;
|
||||
l = 64 - p->inlen;
|
||||
l = (len < l) ? len : l;
|
||||
|
||||
memcpy(p->in.u8 + p->inlen, s, l);
|
||||
s += l;
|
||||
|
||||
s += l;
|
||||
p->inlen += l;
|
||||
len -= l;
|
||||
len -= l;
|
||||
|
||||
if (p->inlen == 64)
|
||||
sha256_block(p);
|
||||
@ -157,13 +166,13 @@ static void sha256_subhash(struct sha256_ctx *p, uint32_t *t)
|
||||
|
||||
/**
|
||||
* sha256_hash:
|
||||
* @out : Output.
|
||||
* @s : Output.
|
||||
* @in : Input.
|
||||
* @size : Size of @out.
|
||||
* @size : Size of @s.
|
||||
*
|
||||
* Hashes SHA256 and outputs a human readable string.
|
||||
**/
|
||||
void sha256_hash(char *out, const uint8_t *in, size_t size)
|
||||
void sha256_hash(char *s, const uint8_t *in, size_t size)
|
||||
{
|
||||
unsigned i;
|
||||
struct sha256_ctx sha;
|
||||
@ -180,7 +189,7 @@ void sha256_hash(char *out, const uint8_t *in, size_t size)
|
||||
sha256_subhash(&sha, shahash.u32);
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
snprintf(out + 2 * i, 3, "%02x", (unsigned)shahash.u8[i]);
|
||||
snprintf(s + 2 * i, 3, "%02x", (unsigned)shahash.u8[i]);
|
||||
}
|
||||
|
||||
#ifndef HAVE_ZLIB
|
||||
@ -293,6 +302,9 @@ uint32_t crc32_calculate(const uint8_t *data, size_t length)
|
||||
|
||||
static void SHA1Reset(SHA1Context *context)
|
||||
{
|
||||
if (!context)
|
||||
return;
|
||||
|
||||
context->Length_Low = 0;
|
||||
context->Length_High = 0;
|
||||
context->Message_Block_Index = 0;
|
||||
@ -341,37 +353,37 @@ static void SHA1ProcessMessageBlock(SHA1Context *context)
|
||||
|
||||
for(t = 0; t < 20; t++)
|
||||
{
|
||||
temp = SHA1CircularShift(5,A) +
|
||||
temp = SHA1CircularShift(5,A) +
|
||||
((B & C) | ((~B) & D)) + E + W[t] + K[0];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
|
||||
for(t = 20; t < 40; t++)
|
||||
{
|
||||
temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
|
||||
temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
|
||||
for(t = 40; t < 60; t++)
|
||||
{
|
||||
temp = SHA1CircularShift(5,A) +
|
||||
temp = SHA1CircularShift(5,A) +
|
||||
((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
|
||||
for(t = 60; t < 80; t++)
|
||||
@ -401,6 +413,9 @@ static void SHA1ProcessMessageBlock(SHA1Context *context)
|
||||
|
||||
static void SHA1PadMessage(SHA1Context *context)
|
||||
{
|
||||
if (!context)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Check to see if the current message block is too small to hold
|
||||
* the initial padding bits and length. If so, we will pad the
|
||||
@ -447,9 +462,9 @@ static int SHA1Result(SHA1Context *context)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void SHA1Input( SHA1Context *context,
|
||||
const unsigned char *message_array,
|
||||
unsigned length)
|
||||
static void SHA1Input(SHA1Context *context,
|
||||
const unsigned char *message_array,
|
||||
unsigned length)
|
||||
{
|
||||
if (!length)
|
||||
return;
|
@ -1,17 +1,23 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* 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.
|
||||
/* Copyright (C) 2010-2015 The RetroArch team
|
||||
*
|
||||
* 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.
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (rhash.h).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
92
libretro-common/utils/Makefile
Normal file
92
libretro-common/utils/Makefile
Normal file
@ -0,0 +1,92 @@
|
||||
compiler := gcc
|
||||
extra_flags :=
|
||||
use_neon := 0
|
||||
release := release
|
||||
DYLIB :=
|
||||
|
||||
ifeq ($(platform),)
|
||||
platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
platform = win
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
platform = osx
|
||||
arch = intel
|
||||
ifeq ($(shell uname -p),powerpc)
|
||||
arch = ppc
|
||||
endif
|
||||
else ifneq ($(findstring win,$(shell uname -a)),)
|
||||
platform = win
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(platform),gcc)
|
||||
extra_rules_gcc := $(shell $(compiler) -dumpmachine)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring armv7,$(extra_rules_gcc)))
|
||||
extra_flags += -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon
|
||||
use_neon := 1
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring hardfloat,$(extra_rules_gcc)))
|
||||
extra_flags += -mfloat-abi=hard
|
||||
endif
|
||||
|
||||
ifeq (release,$(build))
|
||||
extra_flags += -O2
|
||||
endif
|
||||
|
||||
ifeq (debug,$(build))
|
||||
extra_flags += -O0 -g
|
||||
endif
|
||||
|
||||
ldflags := -shared -Wl,--version-script=link.T
|
||||
|
||||
ifeq ($(platform), unix)
|
||||
DYLIB =
|
||||
else ifeq ($(platform), osx)
|
||||
compiler := $(CC)
|
||||
DYLIB =
|
||||
ldflags := -dynamiclib
|
||||
else
|
||||
extra_flags += -static-libgcc -static-libstdc++
|
||||
DYLIB = exe
|
||||
endif
|
||||
|
||||
CC := $(compiler)
|
||||
CXX := $(subst CC,++,$(compiler))
|
||||
flags := -fPIC $(extra_flags) -I../../libretro-common/include
|
||||
asflags := -fPIC $(extra_flags)
|
||||
objects :=
|
||||
LDFLAGS := -lz
|
||||
flags += -std=c99
|
||||
|
||||
|
||||
ifeq (1,$(use_neon))
|
||||
ASMFLAGS := -INEON/asm
|
||||
asflags += -mfpu=neon
|
||||
endif
|
||||
|
||||
objects += crc32$(DYLIB) djb2$(DYLIB) md5$(DYLIB) sha1$(DYLIB)
|
||||
|
||||
all: build;
|
||||
|
||||
%.o: %.S
|
||||
$(CC) -c -o $@ $(asflags) $(LDFLAGS) $(ASMFLAGS) $<
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $@ $(flags) $<
|
||||
|
||||
%.$(DYLIB): %.o
|
||||
$(CC) -o $@ $(ldflags) $(flags) $^
|
||||
|
||||
build: $(objects)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f *.$(DYLIB)
|
||||
|
||||
strip:
|
||||
strip -s *.$(DYLIB)
|
42
libretro-common/utils/crc32.c
Normal file
42
libretro-common/utils/crc32.c
Normal file
@ -0,0 +1,42 @@
|
||||
/* gcc -O3 -o crc32 crc32.c -lz */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <zlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
if (argc != 2 )
|
||||
{
|
||||
fprintf( stderr, "Usage: crc32 <filename>\n" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
FILE *file = fopen(argv[1], "rb");
|
||||
|
||||
if (file)
|
||||
{
|
||||
uLong crc = crc32(0L, Z_NULL, 0 );
|
||||
|
||||
for (;;)
|
||||
{
|
||||
Bytef buffer[16384];
|
||||
|
||||
int numread = fread((void*)buffer, 1, sizeof(buffer), file);
|
||||
|
||||
if (numread > 0)
|
||||
crc = crc32( crc, buffer, numread );
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
|
||||
printf("%08x\n", crc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Error opening input file: %s\n", strerror(errno));
|
||||
return 1;
|
||||
}
|
26
libretro-common/utils/djb2.c
Normal file
26
libretro-common/utils/djb2.c
Normal file
@ -0,0 +1,26 @@
|
||||
/* public domain */
|
||||
/* gcc -O3 -o djb2 djb2.c */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
static uint32_t djb2(const char* str)
|
||||
{
|
||||
const unsigned char* aux = (const unsigned char*)str;
|
||||
uint32_t hash = 5381;
|
||||
|
||||
while (*aux)
|
||||
hash = (hash << 5) + hash + *aux++;
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
printf( "0x%08xU: %s\n", djb2( argv[ i ] ), argv[ i ] );
|
||||
|
||||
return 0;
|
||||
}
|
525
libretro-common/utils/md5.c
Normal file
525
libretro-common/utils/md5.c
Normal file
@ -0,0 +1,525 @@
|
||||
/*
|
||||
**********************************************************************
|
||||
** md5.h -- Header file for implementation of MD5 **
|
||||
** RSA Data Security, Inc. MD5 Message Digest Algorithm **
|
||||
** Created: 2/17/90 RLR **
|
||||
** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
|
||||
** Revised (for MD5): RLR 4/27/91 **
|
||||
** -- G modified to have y&~z instead of y&z **
|
||||
** -- FF, GG, HH modified to add in last register done **
|
||||
** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
|
||||
** -- distinct additive constant for each step **
|
||||
** -- round 4 added, working mod 7 **
|
||||
**********************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
|
||||
** **
|
||||
** License to copy and use this software is granted provided that **
|
||||
** it is identified as the "RSA Data Security, Inc. MD5 Message **
|
||||
** Digest Algorithm" in all material mentioning or referencing this **
|
||||
** software or this function. **
|
||||
** **
|
||||
** License is also granted to make and use derivative works **
|
||||
** provided that such works are identified as "derived from the RSA **
|
||||
** Data Security, Inc. MD5 Message Digest Algorithm" in all **
|
||||
** material mentioning or referencing the derived work. **
|
||||
** **
|
||||
** RSA Data Security, Inc. makes no representations concerning **
|
||||
** either the merchantability of this software or the suitability **
|
||||
** of this software for any particular purpose. It is provided "as **
|
||||
** is" without express or implied warranty of any kind. **
|
||||
** **
|
||||
** These notices must be retained in any copies of any part of this **
|
||||
** documentation and/or software. **
|
||||
**********************************************************************
|
||||
*/
|
||||
|
||||
/* typedef a 32 bit type */
|
||||
typedef unsigned long int UINT4;
|
||||
|
||||
/* Data structure for MD5 (Message Digest) computation */
|
||||
typedef struct
|
||||
{
|
||||
UINT4 i[2]; /* number of _bits_ handled mod 2^64 */
|
||||
UINT4 buf[4]; /* scratch buffer */
|
||||
unsigned char in[64]; /* input buffer */
|
||||
unsigned char digest[16]; /* actual digest after MD5Final call */
|
||||
} MD5_CTX;
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
** End of md5.h **
|
||||
******************************* (cut) ********************************
|
||||
*/
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
** md5.c **
|
||||
** RSA Data Security, Inc. MD5 Message Digest Algorithm **
|
||||
** Created: 2/17/90 RLR **
|
||||
** Revised: 1/91 SRD,AJ,BSK,JT Reference C Version **
|
||||
**********************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
|
||||
** **
|
||||
** License to copy and use this software is granted provided that **
|
||||
** it is identified as the "RSA Data Security, Inc. MD5 Message **
|
||||
** Digest Algorithm" in all material mentioning or referencing this **
|
||||
** software or this function. **
|
||||
** **
|
||||
** License is also granted to make and use derivative works **
|
||||
** provided that such works are identified as "derived from the RSA **
|
||||
** Data Security, Inc. MD5 Message Digest Algorithm" in all **
|
||||
** material mentioning or referencing the derived work. **
|
||||
** **
|
||||
** RSA Data Security, Inc. makes no representations concerning **
|
||||
** either the merchantability of this software or the suitability **
|
||||
** of this software for any particular purpose. It is provided "as **
|
||||
** is" without express or implied warranty of any kind. **
|
||||
** **
|
||||
** These notices must be retained in any copies of any part of this **
|
||||
** documentation and/or software. **
|
||||
**********************************************************************
|
||||
*/
|
||||
|
||||
/* -- include the following line if the md5.h header file is separate -- */
|
||||
/* #include "md5.h" */
|
||||
|
||||
static unsigned char PADDING[64] = {
|
||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
/* F, G and H are basic MD5 functions: selection, majority, parity */
|
||||
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
|
||||
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
|
||||
#define H(x, y, z) ((x) ^ (y) ^ (z))
|
||||
#define I(x, y, z) ((y) ^ ((x) | (~z)))
|
||||
|
||||
/* ROTATE_LEFT rotates x left n bits */
|
||||
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
|
||||
|
||||
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */
|
||||
/* Rotation is separate from addition to prevent recomputation */
|
||||
#define FF(a, b, c, d, x, s, ac) \
|
||||
{(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define GG(a, b, c, d, x, s, ac) \
|
||||
{(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define HH(a, b, c, d, x, s, ac) \
|
||||
{(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define II(a, b, c, d, x, s, ac) \
|
||||
{(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
|
||||
void MD5Init(MD5_CTX *mdContext)
|
||||
{
|
||||
mdContext->i[0] = mdContext->i[1] = (UINT4)0;
|
||||
|
||||
/* Load magic initialization constants.
|
||||
*/
|
||||
mdContext->buf[0] = (UINT4)0x67452301;
|
||||
mdContext->buf[1] = (UINT4)0xefcdab89;
|
||||
mdContext->buf[2] = (UINT4)0x98badcfe;
|
||||
mdContext->buf[3] = (UINT4)0x10325476;
|
||||
}
|
||||
|
||||
/* Basic MD5 step. Transform buf based on in.
|
||||
*/
|
||||
static void Transform (UINT4 *buf, UINT4 *in)
|
||||
{
|
||||
UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
|
||||
|
||||
/* Round 1 */
|
||||
#define S11 7
|
||||
#define S12 12
|
||||
#define S13 17
|
||||
#define S14 22
|
||||
FF ( a, b, c, d, in[ 0], S11, 3614090360); /* 1 */
|
||||
FF ( d, a, b, c, in[ 1], S12, 3905402710); /* 2 */
|
||||
FF ( c, d, a, b, in[ 2], S13, 606105819); /* 3 */
|
||||
FF ( b, c, d, a, in[ 3], S14, 3250441966); /* 4 */
|
||||
FF ( a, b, c, d, in[ 4], S11, 4118548399); /* 5 */
|
||||
FF ( d, a, b, c, in[ 5], S12, 1200080426); /* 6 */
|
||||
FF ( c, d, a, b, in[ 6], S13, 2821735955); /* 7 */
|
||||
FF ( b, c, d, a, in[ 7], S14, 4249261313); /* 8 */
|
||||
FF ( a, b, c, d, in[ 8], S11, 1770035416); /* 9 */
|
||||
FF ( d, a, b, c, in[ 9], S12, 2336552879); /* 10 */
|
||||
FF ( c, d, a, b, in[10], S13, 4294925233); /* 11 */
|
||||
FF ( b, c, d, a, in[11], S14, 2304563134); /* 12 */
|
||||
FF ( a, b, c, d, in[12], S11, 1804603682); /* 13 */
|
||||
FF ( d, a, b, c, in[13], S12, 4254626195); /* 14 */
|
||||
FF ( c, d, a, b, in[14], S13, 2792965006); /* 15 */
|
||||
FF ( b, c, d, a, in[15], S14, 1236535329); /* 16 */
|
||||
|
||||
/* Round 2 */
|
||||
#define S21 5
|
||||
#define S22 9
|
||||
#define S23 14
|
||||
#define S24 20
|
||||
GG ( a, b, c, d, in[ 1], S21, 4129170786); /* 17 */
|
||||
GG ( d, a, b, c, in[ 6], S22, 3225465664); /* 18 */
|
||||
GG ( c, d, a, b, in[11], S23, 643717713); /* 19 */
|
||||
GG ( b, c, d, a, in[ 0], S24, 3921069994); /* 20 */
|
||||
GG ( a, b, c, d, in[ 5], S21, 3593408605); /* 21 */
|
||||
GG ( d, a, b, c, in[10], S22, 38016083); /* 22 */
|
||||
GG ( c, d, a, b, in[15], S23, 3634488961); /* 23 */
|
||||
GG ( b, c, d, a, in[ 4], S24, 3889429448); /* 24 */
|
||||
GG ( a, b, c, d, in[ 9], S21, 568446438); /* 25 */
|
||||
GG ( d, a, b, c, in[14], S22, 3275163606); /* 26 */
|
||||
GG ( c, d, a, b, in[ 3], S23, 4107603335); /* 27 */
|
||||
GG ( b, c, d, a, in[ 8], S24, 1163531501); /* 28 */
|
||||
GG ( a, b, c, d, in[13], S21, 2850285829); /* 29 */
|
||||
GG ( d, a, b, c, in[ 2], S22, 4243563512); /* 30 */
|
||||
GG ( c, d, a, b, in[ 7], S23, 1735328473); /* 31 */
|
||||
GG ( b, c, d, a, in[12], S24, 2368359562); /* 32 */
|
||||
|
||||
/* Round 3 */
|
||||
#define S31 4
|
||||
#define S32 11
|
||||
#define S33 16
|
||||
#define S34 23
|
||||
HH ( a, b, c, d, in[ 5], S31, 4294588738); /* 33 */
|
||||
HH ( d, a, b, c, in[ 8], S32, 2272392833); /* 34 */
|
||||
HH ( c, d, a, b, in[11], S33, 1839030562); /* 35 */
|
||||
HH ( b, c, d, a, in[14], S34, 4259657740); /* 36 */
|
||||
HH ( a, b, c, d, in[ 1], S31, 2763975236); /* 37 */
|
||||
HH ( d, a, b, c, in[ 4], S32, 1272893353); /* 38 */
|
||||
HH ( c, d, a, b, in[ 7], S33, 4139469664); /* 39 */
|
||||
HH ( b, c, d, a, in[10], S34, 3200236656); /* 40 */
|
||||
HH ( a, b, c, d, in[13], S31, 681279174); /* 41 */
|
||||
HH ( d, a, b, c, in[ 0], S32, 3936430074); /* 42 */
|
||||
HH ( c, d, a, b, in[ 3], S33, 3572445317); /* 43 */
|
||||
HH ( b, c, d, a, in[ 6], S34, 76029189); /* 44 */
|
||||
HH ( a, b, c, d, in[ 9], S31, 3654602809); /* 45 */
|
||||
HH ( d, a, b, c, in[12], S32, 3873151461); /* 46 */
|
||||
HH ( c, d, a, b, in[15], S33, 530742520); /* 47 */
|
||||
HH ( b, c, d, a, in[ 2], S34, 3299628645); /* 48 */
|
||||
|
||||
/* Round 4 */
|
||||
#define S41 6
|
||||
#define S42 10
|
||||
#define S43 15
|
||||
#define S44 21
|
||||
II ( a, b, c, d, in[ 0], S41, 4096336452); /* 49 */
|
||||
II ( d, a, b, c, in[ 7], S42, 1126891415); /* 50 */
|
||||
II ( c, d, a, b, in[14], S43, 2878612391); /* 51 */
|
||||
II ( b, c, d, a, in[ 5], S44, 4237533241); /* 52 */
|
||||
II ( a, b, c, d, in[12], S41, 1700485571); /* 53 */
|
||||
II ( d, a, b, c, in[ 3], S42, 2399980690); /* 54 */
|
||||
II ( c, d, a, b, in[10], S43, 4293915773); /* 55 */
|
||||
II ( b, c, d, a, in[ 1], S44, 2240044497); /* 56 */
|
||||
II ( a, b, c, d, in[ 8], S41, 1873313359); /* 57 */
|
||||
II ( d, a, b, c, in[15], S42, 4264355552); /* 58 */
|
||||
II ( c, d, a, b, in[ 6], S43, 2734768916); /* 59 */
|
||||
II ( b, c, d, a, in[13], S44, 1309151649); /* 60 */
|
||||
II ( a, b, c, d, in[ 4], S41, 4149444226); /* 61 */
|
||||
II ( d, a, b, c, in[11], S42, 3174756917); /* 62 */
|
||||
II ( c, d, a, b, in[ 2], S43, 718787259); /* 63 */
|
||||
II ( b, c, d, a, in[ 9], S44, 3951481745); /* 64 */
|
||||
|
||||
buf[0] += a;
|
||||
buf[1] += b;
|
||||
buf[2] += c;
|
||||
buf[3] += d;
|
||||
}
|
||||
|
||||
void MD5Update (MD5_CTX *mdContext,
|
||||
unsigned char *inBuf, unsigned int inLen)
|
||||
{
|
||||
UINT4 in[16];
|
||||
int mdi;
|
||||
unsigned int i, ii;
|
||||
|
||||
/* compute number of bytes mod 64 */
|
||||
mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
|
||||
|
||||
/* update number of bits */
|
||||
if ((mdContext->i[0] + ((UINT4)inLen << 3)) < mdContext->i[0])
|
||||
mdContext->i[1]++;
|
||||
mdContext->i[0] += ((UINT4)inLen << 3);
|
||||
mdContext->i[1] += ((UINT4)inLen >> 29);
|
||||
|
||||
while (inLen--)
|
||||
{
|
||||
/* add new character to buffer, increment mdi */
|
||||
mdContext->in[mdi++] = *inBuf++;
|
||||
|
||||
/* transform if necessary */
|
||||
if (mdi == 0x40)
|
||||
{
|
||||
for (i = 0, ii = 0; i < 16; i++, ii += 4)
|
||||
in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
|
||||
(((UINT4)mdContext->in[ii+2]) << 16) |
|
||||
(((UINT4)mdContext->in[ii+1]) << 8) |
|
||||
((UINT4)mdContext->in[ii]);
|
||||
Transform (mdContext->buf, in);
|
||||
mdi = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MD5Final (MD5_CTX *mdContext)
|
||||
{
|
||||
UINT4 in[16];
|
||||
int mdi;
|
||||
unsigned int i, ii;
|
||||
unsigned int padLen;
|
||||
|
||||
/* save number of bits */
|
||||
in[14] = mdContext->i[0];
|
||||
in[15] = mdContext->i[1];
|
||||
|
||||
/* compute number of bytes mod 64 */
|
||||
mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
|
||||
|
||||
/* pad out to 56 mod 64 */
|
||||
padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi);
|
||||
MD5Update (mdContext, PADDING, padLen);
|
||||
|
||||
/* append length in bits and transform */
|
||||
for (i = 0, ii = 0; i < 14; i++, ii += 4)
|
||||
in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
|
||||
(((UINT4)mdContext->in[ii+2]) << 16) |
|
||||
(((UINT4)mdContext->in[ii+1]) << 8) |
|
||||
((UINT4)mdContext->in[ii]);
|
||||
Transform (mdContext->buf, in);
|
||||
|
||||
/* store buffer in digest */
|
||||
for (i = 0, ii = 0; i < 4; i++, ii += 4) {
|
||||
mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF);
|
||||
mdContext->digest[ii+1] =
|
||||
(unsigned char)((mdContext->buf[i] >> 8) & 0xFF);
|
||||
mdContext->digest[ii+2] =
|
||||
(unsigned char)((mdContext->buf[i] >> 16) & 0xFF);
|
||||
mdContext->digest[ii+3] =
|
||||
(unsigned char)((mdContext->buf[i] >> 24) & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
** End of md5.c **
|
||||
******************************* (cut) ********************************
|
||||
*/
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
** md5driver.c -- sample routines to test **
|
||||
** RSA Data Security, Inc. MD5 message digest algorithm. **
|
||||
** Created: 2/16/90 RLR **
|
||||
** Updated: 1/91 SRD **
|
||||
**********************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
|
||||
** **
|
||||
** RSA Data Security, Inc. makes no representations concerning **
|
||||
** either the merchantability of this software or the suitability **
|
||||
** of this software for any particular purpose. It is provided "as **
|
||||
** is" without express or implied warranty of any kind. **
|
||||
** **
|
||||
** These notices must be retained in any copies of any part of this **
|
||||
** documentation and/or software. **
|
||||
**********************************************************************
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
||||
/* -- include the following file if the file md5.h is separate -- */
|
||||
/* #include "md5.h" */
|
||||
|
||||
/* Prints message digest buffer in mdContext as 32 hexadecimal digits.
|
||||
Order is from low-order byte to high-order byte of digest.
|
||||
Each byte is printed with high-order hexadecimal digit first.
|
||||
*/
|
||||
static void MDPrint(MD5_CTX *mdContext)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
printf ("%02x", mdContext->digest[i]);
|
||||
}
|
||||
|
||||
/* size of test block */
|
||||
#define TEST_BLOCK_SIZE 1000
|
||||
|
||||
/* number of blocks to process */
|
||||
#define TEST_BLOCKS 10000
|
||||
|
||||
/* number of test bytes = TEST_BLOCK_SIZE * TEST_BLOCKS */
|
||||
static long TEST_BYTES = (long)TEST_BLOCK_SIZE * (long)TEST_BLOCKS;
|
||||
|
||||
/* A time trial routine, to measure the speed of MD5.
|
||||
Measures wall time required to digest TEST_BLOCKS * TEST_BLOCK_SIZE
|
||||
characters.
|
||||
*/
|
||||
static void MDTimeTrial(void)
|
||||
{
|
||||
MD5_CTX mdContext;
|
||||
time_t endTime, startTime;
|
||||
unsigned char data[TEST_BLOCK_SIZE];
|
||||
unsigned int i;
|
||||
|
||||
/* initialize test data */
|
||||
for (i = 0; i < TEST_BLOCK_SIZE; i++)
|
||||
data[i] = (unsigned char)(i & 0xFF);
|
||||
|
||||
/* start timer */
|
||||
printf ("MD5 time trial. Processing %ld characters...\n", TEST_BYTES);
|
||||
time (&startTime);
|
||||
|
||||
/* digest data in TEST_BLOCK_SIZE byte blocks */
|
||||
MD5Init (&mdContext);
|
||||
for (i = TEST_BLOCKS; i > 0; i--)
|
||||
MD5Update (&mdContext, data, TEST_BLOCK_SIZE);
|
||||
MD5Final (&mdContext);
|
||||
|
||||
/* stop timer, get time difference */
|
||||
time (&endTime);
|
||||
MDPrint (&mdContext);
|
||||
printf (" is digest of test input.\n");
|
||||
printf
|
||||
("Seconds to process test input: %ld\n", (long)(endTime-startTime));
|
||||
printf
|
||||
("Characters processed per second: %ld\n",
|
||||
TEST_BYTES/(endTime-startTime));
|
||||
}
|
||||
|
||||
/* Computes the message digest for string inString.
|
||||
Prints out message digest, a space, the string (in quotes) and a
|
||||
carriage return.
|
||||
*/
|
||||
static void MDString(char *inString)
|
||||
{
|
||||
MD5_CTX mdContext;
|
||||
unsigned int len = strlen (inString);
|
||||
|
||||
MD5Init (&mdContext);
|
||||
MD5Update (&mdContext, inString, len);
|
||||
MD5Final (&mdContext);
|
||||
MDPrint (&mdContext);
|
||||
printf (" \"%s\"\n\n", inString);
|
||||
}
|
||||
|
||||
/* Computes the message digest for a specified file.
|
||||
Prints out message digest, a space, the file name, and a carriage
|
||||
return.
|
||||
*/
|
||||
static void MDFile (char *filename)
|
||||
{
|
||||
FILE *inFile = fopen (filename, "rb");
|
||||
MD5_CTX mdContext;
|
||||
int bytes;
|
||||
unsigned char data[1024];
|
||||
|
||||
if (inFile == NULL)
|
||||
{
|
||||
printf ("%s can't be opened.\n", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
MD5Init (&mdContext);
|
||||
while ((bytes = fread (data, 1, 1024, inFile)) != 0)
|
||||
MD5Update (&mdContext, data, bytes);
|
||||
MD5Final (&mdContext);
|
||||
MDPrint (&mdContext);
|
||||
printf (" %s\n", filename);
|
||||
fclose (inFile);
|
||||
}
|
||||
|
||||
/* Writes the message digest of the data from stdin onto stdout,
|
||||
followed by a carriage return.
|
||||
*/
|
||||
static void MDFilter(void)
|
||||
{
|
||||
MD5_CTX mdContext;
|
||||
int bytes;
|
||||
unsigned char data[16];
|
||||
|
||||
MD5Init (&mdContext);
|
||||
while ((bytes = fread (data, 1, 16, stdin)) != 0)
|
||||
MD5Update (&mdContext, data, bytes);
|
||||
MD5Final (&mdContext);
|
||||
MDPrint (&mdContext);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
/* Runs a standard suite of test data.
|
||||
*/
|
||||
static void MDTestSuite(void)
|
||||
{
|
||||
printf ("MD5 test suite results:\n\n");
|
||||
MDString ("");
|
||||
MDString ("a");
|
||||
MDString ("abc");
|
||||
MDString ("message digest");
|
||||
MDString ("abcdefghijklmnopqrstuvwxyz");
|
||||
MDString
|
||||
("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
||||
MDString
|
||||
("1234567890123456789012345678901234567890\
|
||||
1234567890123456789012345678901234567890");
|
||||
/* Contents of file foo are "abc" */
|
||||
MDFile ("foo");
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
/* For each command line argument in turn:
|
||||
** filename -- prints message digest and name of file
|
||||
** -sstring -- prints message digest and contents of string
|
||||
** -t -- prints time trial statistics for 1M characters
|
||||
** -x -- execute a standard suite of test data
|
||||
** (no args) -- writes messages digest of stdin onto stdout
|
||||
*/
|
||||
if (argc == 1)
|
||||
MDFilter ();
|
||||
else
|
||||
for (i = 1; i < argc; i++)
|
||||
if (argv[i][0] == '-' && argv[i][1] == 's')
|
||||
MDString (argv[i] + 2);
|
||||
else if (strcmp (argv[i], "-t") == 0)
|
||||
MDTimeTrial ();
|
||||
else if (strcmp (argv[i], "-x") == 0)
|
||||
MDTestSuite ();
|
||||
else MDFile (argv[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
**********************************************************************
|
||||
** End of md5driver.c **
|
||||
******************************* (cut) ********************************
|
||||
*/
|
589
libretro-common/utils/sha1.c
Normal file
589
libretro-common/utils/sha1.c
Normal file
@ -0,0 +1,589 @@
|
||||
/*
|
||||
* sha1.h
|
||||
*
|
||||
* Copyright (C) 1998, 2009
|
||||
* Paul E. Jones <paulej@packetizer.com>
|
||||
* All Rights Reserved
|
||||
*
|
||||
*****************************************************************************
|
||||
* $Id: sha1.h 12 2009-06-22 19:34:25Z paulej $
|
||||
*****************************************************************************
|
||||
*
|
||||
* Description:
|
||||
* This class implements the Secure Hashing Standard as defined
|
||||
* in FIPS PUB 180-1 published April 17, 1995.
|
||||
*
|
||||
* Many of the variable names in the SHA1Context, especially the
|
||||
* single character names, were used because those were the names
|
||||
* used in the publication.
|
||||
*
|
||||
* Please read the file sha1.c for more information.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SHA1_H_
|
||||
#define _SHA1_H_
|
||||
|
||||
/*
|
||||
* This structure will hold context information for the hashing
|
||||
* operation
|
||||
*/
|
||||
typedef struct SHA1Context
|
||||
{
|
||||
unsigned Message_Digest[5]; /* Message Digest (output) */
|
||||
|
||||
unsigned Length_Low; /* Message length in bits */
|
||||
unsigned Length_High; /* Message length in bits */
|
||||
|
||||
unsigned char Message_Block[64]; /* 512-bit message blocks */
|
||||
int Message_Block_Index; /* Index into message block array */
|
||||
|
||||
int Computed; /* Is the digest computed? */
|
||||
int Corrupted; /* Is the message digest corruped? */
|
||||
} SHA1Context;
|
||||
|
||||
/*
|
||||
* Function Prototypes
|
||||
*/
|
||||
void SHA1Reset(SHA1Context *);
|
||||
int SHA1Result(SHA1Context *);
|
||||
void SHA1Input( SHA1Context *,
|
||||
const unsigned char *,
|
||||
unsigned);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* sha1.c
|
||||
*
|
||||
* Copyright (C) 1998, 2009
|
||||
* Paul E. Jones <paulej@packetizer.com>
|
||||
* All Rights Reserved
|
||||
*
|
||||
*****************************************************************************
|
||||
* $Id: sha1.c 12 2009-06-22 19:34:25Z paulej $
|
||||
*****************************************************************************
|
||||
*
|
||||
* Description:
|
||||
* This file implements the Secure Hashing Standard as defined
|
||||
* in FIPS PUB 180-1 published April 17, 1995.
|
||||
*
|
||||
* The Secure Hashing Standard, which uses the Secure Hashing
|
||||
* Algorithm (SHA), produces a 160-bit message digest for a
|
||||
* given data stream. In theory, it is highly improbable that
|
||||
* two messages will produce the same message digest. Therefore,
|
||||
* this algorithm can serve as a means of providing a "fingerprint"
|
||||
* for a message.
|
||||
*
|
||||
* Portability Issues:
|
||||
* SHA-1 is defined in terms of 32-bit "words". This code was
|
||||
* written with the expectation that the processor has at least
|
||||
* a 32-bit machine word size. If the machine word size is larger,
|
||||
* the code should still function properly. One caveat to that
|
||||
* is that the input functions taking characters and character
|
||||
* arrays assume that only 8 bits of information are stored in each
|
||||
* character.
|
||||
*
|
||||
* Caveats:
|
||||
* SHA-1 is designed to work with messages less than 2^64 bits
|
||||
* long. Although SHA-1 allows a message digest to be generated for
|
||||
* messages of any number of bits less than 2^64, this
|
||||
* implementation only works with messages with a length that is a
|
||||
* multiple of the size of an 8-bit character.
|
||||
*
|
||||
*/
|
||||
|
||||
/*#include "sha1.h"*/
|
||||
|
||||
/*
|
||||
* Define the circular shift macro
|
||||
*/
|
||||
#define SHA1CircularShift(bits,word) \
|
||||
((((word) << (bits)) & 0xFFFFFFFF) | \
|
||||
((word) >> (32-(bits))))
|
||||
|
||||
/* Function prototypes */
|
||||
void SHA1ProcessMessageBlock(SHA1Context *);
|
||||
void SHA1PadMessage(SHA1Context *);
|
||||
|
||||
/*
|
||||
* SHA1Reset
|
||||
*
|
||||
* Description:
|
||||
* This function will initialize the SHA1Context in preparation
|
||||
* for computing a new message digest.
|
||||
*
|
||||
* Parameters:
|
||||
* context: [in/out]
|
||||
* The context to reset.
|
||||
*
|
||||
* Returns:
|
||||
* Nothing.
|
||||
*
|
||||
* Comments:
|
||||
*
|
||||
*/
|
||||
void SHA1Reset(SHA1Context *context)
|
||||
{
|
||||
context->Length_Low = 0;
|
||||
context->Length_High = 0;
|
||||
context->Message_Block_Index = 0;
|
||||
|
||||
context->Message_Digest[0] = 0x67452301;
|
||||
context->Message_Digest[1] = 0xEFCDAB89;
|
||||
context->Message_Digest[2] = 0x98BADCFE;
|
||||
context->Message_Digest[3] = 0x10325476;
|
||||
context->Message_Digest[4] = 0xC3D2E1F0;
|
||||
|
||||
context->Computed = 0;
|
||||
context->Corrupted = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* SHA1Result
|
||||
*
|
||||
* Description:
|
||||
* This function will return the 160-bit message digest into the
|
||||
* Message_Digest array within the SHA1Context provided
|
||||
*
|
||||
* Parameters:
|
||||
* context: [in/out]
|
||||
* The context to use to calculate the SHA-1 hash.
|
||||
*
|
||||
* Returns:
|
||||
* 1 if successful, 0 if it failed.
|
||||
*
|
||||
* Comments:
|
||||
*
|
||||
*/
|
||||
int SHA1Result(SHA1Context *context)
|
||||
{
|
||||
if (context->Corrupted)
|
||||
return 0;
|
||||
|
||||
if (!context->Computed)
|
||||
{
|
||||
SHA1PadMessage(context);
|
||||
context->Computed = 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* SHA1Input
|
||||
*
|
||||
* Description:
|
||||
* This function accepts an array of octets as the next portion of
|
||||
* the message.
|
||||
*
|
||||
* Parameters:
|
||||
* context: [in/out]
|
||||
* The SHA-1 context to update
|
||||
* message_array: [in]
|
||||
* An array of characters representing the next portion of the
|
||||
* message.
|
||||
* length: [in]
|
||||
* The length of the message in message_array
|
||||
*
|
||||
* Returns:
|
||||
* Nothing.
|
||||
*
|
||||
* Comments:
|
||||
*
|
||||
*/
|
||||
void SHA1Input( SHA1Context *context,
|
||||
const unsigned char *message_array,
|
||||
unsigned length)
|
||||
{
|
||||
if (!length)
|
||||
return;
|
||||
|
||||
if (context->Computed || context->Corrupted)
|
||||
{
|
||||
context->Corrupted = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
while(length-- && !context->Corrupted)
|
||||
{
|
||||
context->Message_Block[context->Message_Block_Index++] =
|
||||
(*message_array & 0xFF);
|
||||
|
||||
context->Length_Low += 8;
|
||||
/* Force it to 32 bits */
|
||||
context->Length_Low &= 0xFFFFFFFF;
|
||||
if (context->Length_Low == 0)
|
||||
{
|
||||
context->Length_High++;
|
||||
/* Force it to 32 bits */
|
||||
context->Length_High &= 0xFFFFFFFF;
|
||||
if (context->Length_High == 0)
|
||||
{
|
||||
/* Message is too long */
|
||||
context->Corrupted = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (context->Message_Block_Index == 64)
|
||||
SHA1ProcessMessageBlock(context);
|
||||
|
||||
message_array++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* SHA1ProcessMessageBlock
|
||||
*
|
||||
* Description:
|
||||
* This function will process the next 512 bits of the message
|
||||
* stored in the Message_Block array.
|
||||
*
|
||||
* Parameters:
|
||||
* None.
|
||||
*
|
||||
* Returns:
|
||||
* Nothing.
|
||||
*
|
||||
* Comments:
|
||||
* Many of the variable names in the SHAContext, especially the
|
||||
* single character names, were used because those were the names
|
||||
* used in the publication.
|
||||
*
|
||||
*
|
||||
*/
|
||||
void SHA1ProcessMessageBlock(SHA1Context *context)
|
||||
{
|
||||
const unsigned K[] = /* Constants defined in SHA-1 */
|
||||
{
|
||||
0x5A827999,
|
||||
0x6ED9EBA1,
|
||||
0x8F1BBCDC,
|
||||
0xCA62C1D6
|
||||
};
|
||||
int t; /* Loop counter */
|
||||
unsigned temp; /* Temporary word value */
|
||||
unsigned W[80]; /* Word sequence */
|
||||
unsigned A, B, C, D, E; /* Word buffers */
|
||||
|
||||
/*
|
||||
* Initialize the first 16 words in the array W
|
||||
*/
|
||||
for(t = 0; t < 16; t++)
|
||||
{
|
||||
W[t] = ((unsigned) context->Message_Block[t * 4]) << 24;
|
||||
W[t] |= ((unsigned) context->Message_Block[t * 4 + 1]) << 16;
|
||||
W[t] |= ((unsigned) context->Message_Block[t * 4 + 2]) << 8;
|
||||
W[t] |= ((unsigned) context->Message_Block[t * 4 + 3]);
|
||||
}
|
||||
|
||||
for(t = 16; t < 80; t++)
|
||||
{
|
||||
W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
|
||||
}
|
||||
|
||||
A = context->Message_Digest[0];
|
||||
B = context->Message_Digest[1];
|
||||
C = context->Message_Digest[2];
|
||||
D = context->Message_Digest[3];
|
||||
E = context->Message_Digest[4];
|
||||
|
||||
for(t = 0; t < 20; t++)
|
||||
{
|
||||
temp = SHA1CircularShift(5,A) +
|
||||
((B & C) | ((~B) & D)) + E + W[t] + K[0];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
|
||||
for(t = 20; t < 40; t++)
|
||||
{
|
||||
temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
|
||||
for(t = 40; t < 60; t++)
|
||||
{
|
||||
temp = SHA1CircularShift(5,A) +
|
||||
((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
|
||||
for(t = 60; t < 80; t++)
|
||||
{
|
||||
temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
|
||||
context->Message_Digest[0] =
|
||||
(context->Message_Digest[0] + A) & 0xFFFFFFFF;
|
||||
context->Message_Digest[1] =
|
||||
(context->Message_Digest[1] + B) & 0xFFFFFFFF;
|
||||
context->Message_Digest[2] =
|
||||
(context->Message_Digest[2] + C) & 0xFFFFFFFF;
|
||||
context->Message_Digest[3] =
|
||||
(context->Message_Digest[3] + D) & 0xFFFFFFFF;
|
||||
context->Message_Digest[4] =
|
||||
(context->Message_Digest[4] + E) & 0xFFFFFFFF;
|
||||
|
||||
context->Message_Block_Index = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* SHA1PadMessage
|
||||
*
|
||||
* Description:
|
||||
* According to the standard, the message must be padded to an even
|
||||
* 512 bits. The first padding bit must be a '1'. The last 64
|
||||
* bits represent the length of the original message. All bits in
|
||||
* between should be 0. This function will pad the message
|
||||
* according to those rules by filling the Message_Block array
|
||||
* accordingly. It will also call SHA1ProcessMessageBlock()
|
||||
* appropriately. When it returns, it can be assumed that the
|
||||
* message digest has been computed.
|
||||
*
|
||||
* Parameters:
|
||||
* context: [in/out]
|
||||
* The context to pad
|
||||
*
|
||||
* Returns:
|
||||
* Nothing.
|
||||
*
|
||||
* Comments:
|
||||
*
|
||||
*/
|
||||
void SHA1PadMessage(SHA1Context *context)
|
||||
{
|
||||
/*
|
||||
* Check to see if the current message block is too small to hold
|
||||
* the initial padding bits and length. If so, we will pad the
|
||||
* block, process it, and then continue padding into a second
|
||||
* block.
|
||||
*/
|
||||
if (context->Message_Block_Index > 55)
|
||||
{
|
||||
context->Message_Block[context->Message_Block_Index++] = 0x80;
|
||||
while(context->Message_Block_Index < 64)
|
||||
context->Message_Block[context->Message_Block_Index++] = 0;
|
||||
|
||||
SHA1ProcessMessageBlock(context);
|
||||
|
||||
while(context->Message_Block_Index < 56)
|
||||
context->Message_Block[context->Message_Block_Index++] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
context->Message_Block[context->Message_Block_Index++] = 0x80;
|
||||
while(context->Message_Block_Index < 56)
|
||||
context->Message_Block[context->Message_Block_Index++] = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Store the message length as the last 8 octets
|
||||
*/
|
||||
context->Message_Block[56] = (context->Length_High >> 24) & 0xFF;
|
||||
context->Message_Block[57] = (context->Length_High >> 16) & 0xFF;
|
||||
context->Message_Block[58] = (context->Length_High >> 8) & 0xFF;
|
||||
context->Message_Block[59] = (context->Length_High) & 0xFF;
|
||||
context->Message_Block[60] = (context->Length_Low >> 24) & 0xFF;
|
||||
context->Message_Block[61] = (context->Length_Low >> 16) & 0xFF;
|
||||
context->Message_Block[62] = (context->Length_Low >> 8) & 0xFF;
|
||||
context->Message_Block[63] = (context->Length_Low) & 0xFF;
|
||||
|
||||
SHA1ProcessMessageBlock(context);
|
||||
}
|
||||
|
||||
/*
|
||||
* sha.cpp
|
||||
*
|
||||
* Copyright (C) 1998, 2009
|
||||
* Paul E. Jones <paulej@packetizer.com>
|
||||
* All Rights Reserved
|
||||
*
|
||||
*****************************************************************************
|
||||
* $Id: sha.c 12 2009-06-22 19:34:25Z paulej $
|
||||
*****************************************************************************
|
||||
*
|
||||
* Description:
|
||||
* This utility will display the message digest (fingerprint) for
|
||||
* the specified file(s).
|
||||
*
|
||||
* Portability Issues:
|
||||
* None.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
/*#include "sha1.h"*/
|
||||
|
||||
/*
|
||||
* Function prototype
|
||||
*/
|
||||
void usage(void);
|
||||
|
||||
|
||||
/*
|
||||
* main
|
||||
*
|
||||
* Description:
|
||||
* This is the entry point for the program
|
||||
*
|
||||
* Parameters:
|
||||
* argc: [in]
|
||||
* This is the count of arguments in the argv array
|
||||
* argv: [in]
|
||||
* This is an array of filenames for which to compute message
|
||||
* digests
|
||||
*
|
||||
* Returns:
|
||||
* Nothing.
|
||||
*
|
||||
* Comments:
|
||||
*
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
SHA1Context sha; /* SHA-1 context */
|
||||
FILE *fp; /* File pointer for reading files*/
|
||||
char c; /* Character read from file */
|
||||
int i; /* Counter */
|
||||
int reading_stdin; /* Are we reading standard in? */
|
||||
int read_stdin = 0; /* Have we read stdin? */
|
||||
|
||||
/*
|
||||
* Check the program arguments and print usage information if -?
|
||||
* or --help is passed as the first argument.
|
||||
*/
|
||||
if (argc > 1 && (!strcmp(argv[1],"-?") ||
|
||||
!strcmp(argv[1],"--help")))
|
||||
{
|
||||
usage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* For each filename passed in on the command line, calculate the
|
||||
* SHA-1 value and display it.
|
||||
*/
|
||||
for(i = 0; i < argc; i++)
|
||||
{
|
||||
/*
|
||||
* We start the counter at 0 to guarantee entry into the for
|
||||
* loop. So if 'i' is zero, we will increment it now. If there
|
||||
* is no argv[1], we will use STDIN below.
|
||||
*/
|
||||
if (i == 0)
|
||||
i++;
|
||||
|
||||
if (argc == 1 || !strcmp(argv[i],"-"))
|
||||
{
|
||||
#ifdef WIN32
|
||||
setmode(fileno(stdin), _O_BINARY);
|
||||
#endif
|
||||
fp = stdin;
|
||||
reading_stdin = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(fp = fopen(argv[i],"rb")))
|
||||
{
|
||||
fprintf(stderr,
|
||||
"sha: unable to open file %s\n",
|
||||
argv[i]);
|
||||
return 2;
|
||||
}
|
||||
reading_stdin = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* We do not want to read STDIN multiple times
|
||||
*/
|
||||
if (reading_stdin)
|
||||
{
|
||||
if (read_stdin)
|
||||
continue;
|
||||
|
||||
read_stdin = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset the SHA-1 context and process input
|
||||
*/
|
||||
SHA1Reset(&sha);
|
||||
|
||||
c = fgetc(fp);
|
||||
while(!feof(fp))
|
||||
{
|
||||
SHA1Input(&sha, &c, 1);
|
||||
c = fgetc(fp);
|
||||
}
|
||||
|
||||
if (!reading_stdin)
|
||||
fclose(fp);
|
||||
|
||||
if (!SHA1Result(&sha))
|
||||
{
|
||||
fprintf(stderr,
|
||||
"sha: could not compute message digest for %s\n",
|
||||
reading_stdin?"STDIN":argv[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( "%08X %08X %08X %08X %08X - %s\n",
|
||||
sha.Message_Digest[0],
|
||||
sha.Message_Digest[1],
|
||||
sha.Message_Digest[2],
|
||||
sha.Message_Digest[3],
|
||||
sha.Message_Digest[4],
|
||||
reading_stdin?"STDIN":argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* usage
|
||||
*
|
||||
* Description:
|
||||
* This function will display program usage information to the
|
||||
* user.
|
||||
*
|
||||
* Parameters:
|
||||
* None.
|
||||
*
|
||||
* Returns:
|
||||
* Nothing.
|
||||
*
|
||||
* Comments:
|
||||
*
|
||||
*/
|
||||
void usage(void)
|
||||
{
|
||||
printf("usage: sha <file> [<file> ...]\n");
|
||||
printf("\tThis program will display the message digest\n");
|
||||
printf("\tfor files using the Secure Hashing Algorithm (SHA-1).\n");
|
||||
}
|
@ -21,17 +21,18 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <compat/posix_string.h>
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "../menu.h"
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_entry.h"
|
||||
#include "../menu_display.h"
|
||||
#include "../../runloop_data.h"
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include "../../gfx/video_thread_wrapper.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../gfx/video_texture.h"
|
||||
#include <compat/posix_string.h>
|
||||
#include "../../retroarch_logger.h"
|
||||
|
||||
#include "shared.h"
|
||||
@ -61,6 +62,7 @@ static void glui_blit_line(float x, float y,
|
||||
{
|
||||
unsigned width, height;
|
||||
glui_handle_t *glui = NULL;
|
||||
struct font_params params = {0};
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
||||
if (!menu)
|
||||
@ -70,8 +72,6 @@ static void glui_blit_line(float x, float y,
|
||||
|
||||
glui = (glui_handle_t*)menu->userdata;
|
||||
|
||||
struct font_params params = {0};
|
||||
|
||||
params.x = x / width;
|
||||
params.y = 1.0f - (y + glui->line_height/2 + menu->font.size/3)
|
||||
/ height;
|
||||
@ -186,8 +186,8 @@ static void glui_render_messagebox(const char *message)
|
||||
uint32_t normal_color;
|
||||
int x, y;
|
||||
struct string_list *list = NULL;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!menu || !menu->userdata)
|
||||
return;
|
||||
@ -297,7 +297,14 @@ static void glui_render_menu_list(glui_handle_t *glui,
|
||||
char entry_path[PATH_MAX_LENGTH], entry_value[PATH_MAX_LENGTH];
|
||||
char message[PATH_MAX_LENGTH],
|
||||
entry_title_buf[PATH_MAX_LENGTH], type_str_buf[PATH_MAX_LENGTH];
|
||||
bool entry_selected = menu_entry_is_currently_selected(i);
|
||||
bool entry_selected;
|
||||
|
||||
y = menu->header_height - menu->scroll_y + (glui->line_height * i);
|
||||
|
||||
if (y > height || y + glui->line_height < 0)
|
||||
continue;
|
||||
|
||||
entry_selected = menu_entry_is_currently_selected(i);
|
||||
menu_entry_get_value(i, entry_value, sizeof(entry_value));
|
||||
menu_entry_get_path(i, entry_path, sizeof(entry_path));
|
||||
|
||||
@ -308,8 +315,6 @@ static void glui_render_menu_list(glui_handle_t *glui,
|
||||
|
||||
strlcpy(message, entry_title_buf, sizeof(message));
|
||||
|
||||
y = menu->header_height - menu->scroll_y + (glui->line_height * i);
|
||||
|
||||
glui_blit_line(glui->margin, y, message,
|
||||
entry_selected ? hover_color : normal_color, TEXT_ALIGN_LEFT);
|
||||
|
||||
|
@ -21,13 +21,14 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "../menu.h"
|
||||
#include "../menu_entry.h"
|
||||
#include "../menu_display.h"
|
||||
#include <compat/posix_string.h>
|
||||
#include <file/file_path.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include "../menu.h"
|
||||
#include "../menu_entry.h"
|
||||
#include "../menu_display.h"
|
||||
|
||||
#include "../../gfx/drivers_font_renderer/bitmap.h"
|
||||
|
||||
#include "shared.h"
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <compat/posix_string.h>
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_entry.h"
|
||||
#include "../menu_input.h"
|
||||
@ -28,7 +30,6 @@
|
||||
#include "../menu.h"
|
||||
#include "../../general.h"
|
||||
#include "../../config.def.h"
|
||||
#include <compat/posix_string.h>
|
||||
#include "../../performance.h"
|
||||
|
||||
#include "../../screenshot.h"
|
||||
|
@ -20,18 +20,22 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include <compat/posix_string.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <rhash.h>
|
||||
|
||||
#include "../menu.h"
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_entry.h"
|
||||
#include "../menu_animation.h"
|
||||
#include "../menu_display.h"
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include "../menu_entries_cbs.h"
|
||||
|
||||
#include "../../gfx/video_thread_wrapper.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../gfx/video_texture.h"
|
||||
#include <compat/posix_string.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../../runloop_data.h"
|
||||
|
||||
@ -1004,10 +1008,15 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
|
||||
menu_entry_t entry;
|
||||
float icon_x, icon_y;
|
||||
char name[PATH_MAX_LENGTH], value[PATH_MAX_LENGTH];
|
||||
GLuint texture_switch = 0;
|
||||
GLuint icon = 0;
|
||||
xmb_node_t * node = (xmb_node_t*)file_list_get_userdata_at_offset(list, i);
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
GLuint texture_switch = 0;
|
||||
GLuint icon = 0;
|
||||
xmb_node_t * node = (xmb_node_t*)file_list_get_userdata_at_offset(list, i);
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
uint32_t hash_label = 0;
|
||||
uint32_t hash_value = 0;
|
||||
bool val1_enable = false;
|
||||
bool val2_enable = false;
|
||||
bool val3_enable = false;
|
||||
|
||||
if (!node)
|
||||
continue;
|
||||
@ -1025,31 +1034,47 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
|
||||
|
||||
menu_entry_get(&entry, i, list, true);
|
||||
|
||||
hash_label = djb2_calculate(entry.label);
|
||||
hash_value = djb2_calculate(entry.value);
|
||||
|
||||
if (entry.type == MENU_FILE_CONTENTLIST_ENTRY)
|
||||
strlcpy(entry.path, path_basename(entry.path), sizeof(entry.path));
|
||||
|
||||
icon = xmb_icon_get_type(xmb, core_node, entry.type);
|
||||
|
||||
if (!strcmp(entry.label, "core_options"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_CORE_OPTIONS].id;
|
||||
else if (!strcmp(entry.label, "core_information"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_CORE_INFO].id;
|
||||
else if (!strcmp(entry.label, "core_input_remapping_options"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_INPUT_REMAPPING_OPTIONS].id;
|
||||
else if (!strcmp(entry.label, "core_cheat_options"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_CHEAT_OPTIONS].id;
|
||||
else if (!strcmp(entry.label, "core_disk_options"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_DISK_OPTIONS].id;
|
||||
else if (!strcmp(entry.label, "savestate"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_SAVESTATE].id;
|
||||
else if (!strcmp(entry.label, "loadstate"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_LOADSTATE].id;
|
||||
else if (!strcmp(entry.label, "take_screenshot"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_SCREENSHOT].id;
|
||||
else if (!strcmp(entry.label, "restart_content"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_RELOAD].id;
|
||||
else if (!strcmp(entry.label, "resume_content"))
|
||||
icon = xmb->textures.list[XMB_TEXTURE_RESUME].id;
|
||||
switch (hash_label)
|
||||
{
|
||||
case MENU_LABEL_CORE_OPTIONS:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_CORE_OPTIONS].id;
|
||||
break;
|
||||
case MENU_LABEL_CORE_INFORMATION:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_CORE_INFO].id;
|
||||
break;
|
||||
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_INPUT_REMAPPING_OPTIONS].id;
|
||||
break;
|
||||
case MENU_LABEL_CORE_CHEAT_OPTIONS:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_CHEAT_OPTIONS].id;
|
||||
break;
|
||||
case MENU_LABEL_DISK_OPTIONS:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_DISK_OPTIONS].id;
|
||||
break;
|
||||
case MENU_LABEL_SAVESTATE:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_SAVESTATE].id;
|
||||
break;
|
||||
case MENU_LABEL_LOADSTATE:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_LOADSTATE].id;
|
||||
break;
|
||||
case MENU_LABEL_TAKE_SCREENSHOT:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_SCREENSHOT].id;
|
||||
break;
|
||||
case MENU_LABEL_RESTART_CONTENT:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_RELOAD].id;
|
||||
break;
|
||||
case MENU_LABEL_RESUME_CONTENT:
|
||||
icon = xmb->textures.list[XMB_TEXTURE_RESUME].id;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
menu_animation_ticker_line(name, 35,
|
||||
@ -1066,19 +1091,22 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
|
||||
frame_count / 20, entry.value,
|
||||
(i == current));
|
||||
|
||||
if(( strcmp(entry.value, "...")
|
||||
&& strcmp(entry.value, "(CORE)")
|
||||
&& strcmp(entry.value, "(RDB)")
|
||||
&& strcmp(entry.value, "(CURSOR)")
|
||||
&& strcmp(entry.value, "(FILE)")
|
||||
&& strcmp(entry.value, "(DIR)")
|
||||
&& strcmp(entry.value, "(COMP)")
|
||||
&& strcmp(entry.value, "ON")
|
||||
&& strcmp(entry.value, "OFF"))
|
||||
|| ((!strcmp(entry.value, "ON")
|
||||
&& !xmb->textures.list[XMB_TEXTURE_SWITCH_ON].id)
|
||||
|| (!strcmp(entry.value, "OFF")
|
||||
&& !xmb->textures.list[XMB_TEXTURE_SWITCH_OFF].id)))
|
||||
val1_enable = (
|
||||
(hash_value != MENU_VALUE_MORE)
|
||||
&& (hash_value != MENU_VALUE_CORE)
|
||||
&& (hash_value != MENU_VALUE_RDB)
|
||||
&& (hash_value != MENU_VALUE_CURSOR)
|
||||
&& (hash_value != MENU_VALUE_FILE)
|
||||
&& (hash_value != MENU_VALUE_DIR)
|
||||
&& (hash_value != MENU_VALUE_COMP)
|
||||
&& (hash_value != MENU_VALUE_ON)
|
||||
&& (hash_value != MENU_VALUE_OFF)
|
||||
);
|
||||
|
||||
val2_enable = ((hash_value == MENU_VALUE_ON) && !xmb->textures.list[XMB_TEXTURE_SWITCH_ON].id);
|
||||
val3_enable = ((hash_value == MENU_VALUE_OFF) && !xmb->textures.list[XMB_TEXTURE_SWITCH_OFF].id);
|
||||
|
||||
if(val1_enable || val2_enable || val3_enable)
|
||||
xmb_draw_text(menu, xmb, value,
|
||||
node->x + xmb->margins.screen.left + xmb->icon.spacing.horizontal +
|
||||
xmb->margins.label.left + xmb->margins.setting.left,
|
||||
@ -1087,16 +1115,21 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl,
|
||||
node->label_alpha,
|
||||
TEXT_ALIGN_LEFT);
|
||||
|
||||
|
||||
xmb_draw_icon_begin(gl);
|
||||
|
||||
xmb_draw_icon(gl, xmb, icon, icon_x, icon_y, node->alpha, 0, node->zoom);
|
||||
|
||||
if (!strcmp(entry.value, "ON") && xmb->textures.list[XMB_TEXTURE_SWITCH_ON].id)
|
||||
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_ON].id;
|
||||
|
||||
if (!strcmp(entry.value, "OFF") && xmb->textures.list[XMB_TEXTURE_SWITCH_OFF].id)
|
||||
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_OFF].id;
|
||||
switch (hash_value)
|
||||
{
|
||||
case MENU_VALUE_ON:
|
||||
if (xmb->textures.list[XMB_TEXTURE_SWITCH_ON].id)
|
||||
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_ON].id;
|
||||
break;
|
||||
case MENU_VALUE_OFF:
|
||||
if (xmb->textures.list[XMB_TEXTURE_SWITCH_OFF].id)
|
||||
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_OFF].id;
|
||||
break;
|
||||
}
|
||||
|
||||
if (texture_switch != 0)
|
||||
xmb_draw_icon_predone(gl, xmb, &mymat,
|
||||
|
@ -14,6 +14,8 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_display.h"
|
||||
#include "menu_entry.h"
|
||||
@ -22,7 +24,6 @@
|
||||
#include "../frontend/frontend.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../performance.h"
|
||||
#include <file/file_path.h>
|
||||
|
||||
static void menu_environment_get(int *argc, char *argv[],
|
||||
void *args, void *params_data)
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "../../general.h"
|
||||
#include "../../runloop.h"
|
||||
#include "menu_input.h"
|
||||
#include "menu_hash.h"
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
||||
#ifndef HAVE_SHADER_MANAGER
|
||||
|
@ -14,11 +14,12 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "menu_animation.h"
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <compat/strl.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include "menu_animation.h"
|
||||
#include "../runloop.h"
|
||||
|
||||
/* from https://github.com/kikito/tween.lua/blob/master/tween.lua */
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <file/file_path.h>
|
||||
#include <file/file_extract.h>
|
||||
#include <file/dir_list.h>
|
||||
#include <rhash.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_display.h"
|
||||
@ -1106,6 +1107,7 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
|
||||
bool match_found = false;
|
||||
struct string_list *tmp_str_list = string_split(
|
||||
playlist->entries[j].crc32, "|");
|
||||
uint32_t hash_value = 0;
|
||||
|
||||
if (!tmp_str_list)
|
||||
continue;
|
||||
@ -1115,20 +1117,22 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
|
||||
if (tmp_str_list->size > 1)
|
||||
strlcpy(elem1, tmp_str_list->elems[1].data, sizeof(elem1));
|
||||
|
||||
if (!strcmp(elem1, "crc"))
|
||||
hash_value = djb2_calculate(elem1);
|
||||
|
||||
switch (hash_value)
|
||||
{
|
||||
if (!strcmp(db_info_entry->crc32, elem0))
|
||||
match_found = true;
|
||||
}
|
||||
else if (!strcmp(elem1, "sha1"))
|
||||
{
|
||||
if (!strcmp(db_info_entry->sha1, elem0))
|
||||
match_found = true;
|
||||
}
|
||||
else if (!strcmp(elem1, "md5"))
|
||||
{
|
||||
if (!strcmp(db_info_entry->md5, elem0))
|
||||
match_found = true;
|
||||
case MENU_VALUE_CRC:
|
||||
if (!strcmp(db_info_entry->crc32, elem0))
|
||||
match_found = true;
|
||||
break;
|
||||
case MENU_VALUE_SHA1:
|
||||
if (!strcmp(db_info_entry->sha1, elem0))
|
||||
match_found = true;
|
||||
break;
|
||||
case MENU_VALUE_MD5:
|
||||
if (!strcmp(db_info_entry->md5, elem0))
|
||||
match_found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
string_list_free(tmp_str_list);
|
||||
@ -1551,6 +1555,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
uint32_t hash_label = djb2_calculate(info->label);
|
||||
|
||||
(void)device;
|
||||
|
||||
@ -1629,7 +1634,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||
break;
|
||||
case RARCH_PLAIN_FILE:
|
||||
default:
|
||||
if (!strcmp(info->label, "detect_core_list"))
|
||||
if (hash_label == MENU_LABEL_DETECT_CORE_LIST)
|
||||
{
|
||||
if (path_is_compressed_file(str_list->elems[i].data))
|
||||
{
|
||||
@ -1657,23 +1662,24 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||
|
||||
/* Push type further down in the chain.
|
||||
* Needed for shader manager currently. */
|
||||
if (!strcmp(info->label, "content_collection_list"))
|
||||
{
|
||||
file_type = MENU_FILE_PLAYLIST_COLLECTION;
|
||||
}
|
||||
else if (!strcmp(info->label, "core_list"))
|
||||
switch (hash_label)
|
||||
{
|
||||
case MENU_LABEL_CONTENT_COLLECTION_LIST:
|
||||
file_type = MENU_FILE_PLAYLIST_COLLECTION;
|
||||
break;
|
||||
case MENU_LABEL_CORE_LIST:
|
||||
#ifdef HAVE_LIBRETRO_MANAGEMENT
|
||||
#ifdef RARCH_CONSOLE
|
||||
if (is_dir || strcasecmp(path, SALAMANDER_FILE) == 0)
|
||||
continue;
|
||||
if (is_dir || strcasecmp(path, SALAMANDER_FILE) == 0)
|
||||
continue;
|
||||
#endif
|
||||
#endif
|
||||
/* Compressed cores are unsupported */
|
||||
if (file_type == MENU_FILE_CARCHIVE)
|
||||
continue;
|
||||
/* Compressed cores are unsupported */
|
||||
if (file_type == MENU_FILE_CARCHIVE)
|
||||
continue;
|
||||
|
||||
file_type = is_dir ? MENU_FILE_DIRECTORY : MENU_FILE_CORE;
|
||||
file_type = is_dir ? MENU_FILE_DIRECTORY : MENU_FILE_CORE;
|
||||
break;
|
||||
}
|
||||
|
||||
menu_list_push(info->list, path, label,
|
||||
@ -1682,7 +1688,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||
|
||||
string_list_free(str_list);
|
||||
|
||||
if (!strcmp(info->label, "core_list"))
|
||||
if (hash_label == MENU_LABEL_CORE_LIST)
|
||||
{
|
||||
const char *dir = NULL;
|
||||
menu_list_get_last_stack(menu->menu_list, &dir, NULL, NULL);
|
||||
@ -2070,7 +2076,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int menu_displaylist_deferred_push(menu_displaylist_info_t *info)
|
||||
static int menu_displaylist_deferred_push(menu_displaylist_info_t *info, uint32_t hash_label)
|
||||
{
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
@ -2078,14 +2084,13 @@ static int menu_displaylist_deferred_push(menu_displaylist_info_t *info)
|
||||
if (!info->list)
|
||||
return -1;
|
||||
|
||||
if (!strcmp(info->label, "Main Menu"))
|
||||
switch (hash_label)
|
||||
{
|
||||
info->flags = SL_FLAG_MAIN_MENU;
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_MAIN_MENU);
|
||||
}
|
||||
else if (!strcmp(info->label, "Horizontal Menu"))
|
||||
{
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_HORIZONTAL);
|
||||
case MENU_VALUE_MAIN_MENU:
|
||||
info->flags = SL_FLAG_MAIN_MENU;
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_MAIN_MENU);
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_HORIZONTAL);
|
||||
}
|
||||
|
||||
cbs = (menu_file_list_cbs_t*)
|
||||
@ -2104,6 +2109,8 @@ int menu_displaylist_push(file_list_t *list, file_list_t *menu_list)
|
||||
const char *label = NULL;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
menu_displaylist_info_t info = {0};
|
||||
uint32_t hash_value = 0;
|
||||
|
||||
|
||||
menu_list_get_last_stack(menu->menu_list, &path, &label, &type);
|
||||
|
||||
@ -2113,7 +2120,9 @@ int menu_displaylist_push(file_list_t *list, file_list_t *menu_list)
|
||||
strlcpy(info.path, path, sizeof(info.path));
|
||||
strlcpy(info.label, label, sizeof(info.label));
|
||||
|
||||
return menu_displaylist_deferred_push(&info);
|
||||
hash_value = djb2_calculate(label);
|
||||
|
||||
return menu_displaylist_deferred_push(&info, hash_value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <string/string_list.h>
|
||||
|
||||
#include "menu_driver.h"
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
|
@ -14,6 +14,8 @@
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include <rhash.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_setting.h"
|
||||
@ -26,34 +28,7 @@
|
||||
#include "../runloop.h"
|
||||
#include "../file_ops.h"
|
||||
|
||||
#include "hash.h"
|
||||
|
||||
#define MENU_LABEL_DRIVER_SETTINGS 0x81cd2d62U
|
||||
#define MENU_LABEL_CORE_SETTINGS 0x06795dffU
|
||||
#define MENU_LABEL_CONFIGURATION_SETTINGS 0x5a1558ceU
|
||||
#define MENU_LABEL_LOGGING_SETTINGS 0x902c003dU
|
||||
#define MENU_LABEL_SAVING_SETTINGS 0x32fea87eU
|
||||
#define MENU_LABEL_REWIND_SETTINGS 0xbff7775fU
|
||||
#define MENU_LABEL_VIDEO_SETTINGS 0x9dd23badU
|
||||
#define MENU_LABEL_RECORDING_SETTINGS 0x1a80b313U
|
||||
#define MENU_LABEL_FRAME_THROTTLE_SETTINGS 0x573b8837U
|
||||
#define MENU_LABEL_SHADER_SETTINGS 0xd6657e8dU
|
||||
#define MENU_LABEL_ONSCREEN_DISPLAY_SETTINGS 0x67571029U
|
||||
#define MENU_LABEL_AUDIO_SETTINGS 0x8f74c888U
|
||||
#define MENU_LABEL_INPUT_SETTINGS 0xddd30846U
|
||||
#define MENU_LABEL_INPUT_HOTKEY_SETTINGS 0xa4fee31aU
|
||||
#define MENU_LABEL_OVERLAY_SETTINGS 0x34377f98U
|
||||
#define MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS 0xa6de9ba6U
|
||||
#define MENU_LABEL_MENU_SETTINGS 0x61e4544bU
|
||||
#define MENU_LABEL_UI_SETTINGS 0xf8da6ef4U
|
||||
#define MENU_LABEL_PATCH_SETTINGS 0xa78b0986U
|
||||
#define MENU_LABEL_PLAYLIST_SETTINGS 0x4d276288U
|
||||
#define MENU_LABEL_CORE_UPDATER_SETTINGS 0x124ad454U
|
||||
#define MENU_LABEL_NETWORK_SETTINGS 0x8b50d180U
|
||||
#define MENU_LABEL_ARCHIVE_SETTINGS 0x78e85398U
|
||||
#define MENU_LABEL_USER_SETTINGS 0xcdc9a8f5U
|
||||
#define MENU_LABEL_DIRECTORY_SETTINGS 0xb817bd2bU
|
||||
#define MENU_LABEL_PRIVACY_SETTINGS 0xce106254U
|
||||
#include <rhash.h>
|
||||
|
||||
void menu_entries_common_load_content(bool persist)
|
||||
{
|
||||
@ -159,91 +134,92 @@ int menu_entries_common_is_settings_entry(const char *label)
|
||||
{
|
||||
uint32_t hash = djb2_calculate(label);
|
||||
const char* str = NULL;
|
||||
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_DRIVER_SETTINGS:
|
||||
str = "Driver Settings";
|
||||
break;
|
||||
case MENU_LABEL_CORE_SETTINGS:
|
||||
str = "Core Settings";
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATION_SETTINGS:
|
||||
str = "Configuration Settings";
|
||||
break;
|
||||
case MENU_LABEL_LOGGING_SETTINGS:
|
||||
str = "Logging Settings";
|
||||
break;
|
||||
case MENU_LABEL_SAVING_SETTINGS:
|
||||
str = "Saving Settings";
|
||||
break;
|
||||
case MENU_LABEL_REWIND_SETTINGS:
|
||||
str = "Rewind Settings";
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SETTINGS:
|
||||
str = "Video Settings";
|
||||
break;
|
||||
case MENU_LABEL_RECORDING_SETTINGS:
|
||||
str = "Recording Settings";
|
||||
break;
|
||||
case MENU_LABEL_FRAME_THROTTLE_SETTINGS:
|
||||
str = "Frame Throttle Settings";
|
||||
break;
|
||||
case MENU_LABEL_SHADER_SETTINGS:
|
||||
str = "Shader Settings";
|
||||
break;
|
||||
case MENU_LABEL_ONSCREEN_DISPLAY_SETTINGS:
|
||||
str = "Onscreen Display Settings";
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_SETTINGS:
|
||||
str = "Audio Settings";
|
||||
break;
|
||||
case MENU_LABEL_INPUT_SETTINGS:
|
||||
str = "Input Settings";
|
||||
break;
|
||||
case MENU_LABEL_INPUT_HOTKEY_SETTINGS:
|
||||
str = "Input Hotkey Settings";
|
||||
break;
|
||||
case MENU_LABEL_OVERLAY_SETTINGS:
|
||||
str = "Overlay Settings";
|
||||
break;
|
||||
case MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS:
|
||||
str = "Onscreen Keyboard Overlay Settings";
|
||||
break;
|
||||
case MENU_LABEL_MENU_SETTINGS:
|
||||
str = "Menu Settings";
|
||||
break;
|
||||
case MENU_LABEL_UI_SETTINGS:
|
||||
str = "UI Settings";
|
||||
break;
|
||||
case MENU_LABEL_PATCH_SETTINGS:
|
||||
str = "Patch Settings";
|
||||
break;
|
||||
case MENU_LABEL_PLAYLIST_SETTINGS:
|
||||
str = "Playlist Settings";
|
||||
break;
|
||||
case MENU_LABEL_CORE_UPDATER_SETTINGS:
|
||||
str = "Core Updater Settings";
|
||||
break;
|
||||
case MENU_LABEL_NETWORK_SETTINGS:
|
||||
str = "Network Settings";
|
||||
break;
|
||||
case MENU_LABEL_ARCHIVE_SETTINGS:
|
||||
str = "Archive Settings";
|
||||
break;
|
||||
case MENU_LABEL_USER_SETTINGS:
|
||||
str = "User Settings";
|
||||
break;
|
||||
case MENU_LABEL_DIRECTORY_SETTINGS:
|
||||
str = "Directory Settings";
|
||||
break;
|
||||
case MENU_LABEL_PRIVACY_SETTINGS:
|
||||
str = "Privacy Settings";
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
case MENU_LABEL_DRIVER_SETTINGS:
|
||||
str = "Driver Settings";
|
||||
break;
|
||||
case MENU_LABEL_CORE_SETTINGS:
|
||||
str = "Core Settings";
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATION_SETTINGS:
|
||||
str = "Configuration Settings";
|
||||
break;
|
||||
case MENU_LABEL_LOGGING_SETTINGS:
|
||||
str = "Logging Settings";
|
||||
break;
|
||||
case MENU_LABEL_SAVING_SETTINGS:
|
||||
str = "Saving Settings";
|
||||
break;
|
||||
case MENU_LABEL_REWIND_SETTINGS:
|
||||
str = "Rewind Settings";
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SETTINGS:
|
||||
str = "Video Settings";
|
||||
break;
|
||||
case MENU_LABEL_RECORDING_SETTINGS:
|
||||
str = "Recording Settings";
|
||||
break;
|
||||
case MENU_LABEL_FRAME_THROTTLE_SETTINGS:
|
||||
str = "Frame Throttle Settings";
|
||||
break;
|
||||
case MENU_LABEL_SHADER_SETTINGS:
|
||||
str = "Shader Settings";
|
||||
break;
|
||||
case MENU_LABEL_ONSCREEN_DISPLAY_SETTINGS:
|
||||
str = "Onscreen Display Settings";
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_SETTINGS:
|
||||
str = "Audio Settings";
|
||||
break;
|
||||
case MENU_LABEL_INPUT_SETTINGS:
|
||||
str = "Input Settings";
|
||||
break;
|
||||
case MENU_LABEL_INPUT_HOTKEY_SETTINGS:
|
||||
str = "Input Hotkey Settings";
|
||||
break;
|
||||
case MENU_LABEL_OVERLAY_SETTINGS:
|
||||
str = "Overlay Settings";
|
||||
break;
|
||||
case MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS:
|
||||
str = "Onscreen Keyboard Overlay Settings";
|
||||
break;
|
||||
case MENU_LABEL_MENU_SETTINGS:
|
||||
str = "Menu Settings";
|
||||
break;
|
||||
case MENU_LABEL_UI_SETTINGS:
|
||||
str = "UI Settings";
|
||||
break;
|
||||
case MENU_LABEL_PATCH_SETTINGS:
|
||||
str = "Patch Settings";
|
||||
break;
|
||||
case MENU_LABEL_PLAYLIST_SETTINGS:
|
||||
str = "Playlist Settings";
|
||||
break;
|
||||
case MENU_LABEL_CORE_UPDATER_SETTINGS:
|
||||
str = "Core Updater Settings";
|
||||
break;
|
||||
case MENU_LABEL_NETWORK_SETTINGS:
|
||||
str = "Network Settings";
|
||||
break;
|
||||
case MENU_LABEL_ARCHIVE_SETTINGS:
|
||||
str = "Archive Settings";
|
||||
break;
|
||||
case MENU_LABEL_USER_SETTINGS:
|
||||
str = "User Settings";
|
||||
break;
|
||||
case MENU_LABEL_DIRECTORY_SETTINGS:
|
||||
str = "Directory Settings";
|
||||
break;
|
||||
case MENU_LABEL_PRIVACY_SETTINGS:
|
||||
str = "Privacy Settings";
|
||||
break;
|
||||
default:
|
||||
RARCH_LOG("unknown hash: %d\n", hash);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return !strcmp(label, str);
|
||||
}
|
||||
|
||||
@ -257,6 +233,7 @@ void menu_entries_cbs_init(void *data,
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
uint32_t label_hash = 0, menu_label_hash = 0;
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
@ -285,20 +262,23 @@ void menu_entries_cbs_init(void *data,
|
||||
str_list = NULL;
|
||||
}
|
||||
|
||||
menu_entries_cbs_init_bind_ok(cbs, path, label, type, idx, elem0, elem1, menu_label);
|
||||
menu_entries_cbs_init_bind_cancel(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_scan(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_start(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_select(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_info(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_content_list_switch(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_up(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_down(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_left(cbs, path, label, type, idx, elem0, elem1, menu_label);
|
||||
menu_entries_cbs_init_bind_right(cbs, path, label, type, idx, elem0, elem1, menu_label);
|
||||
menu_entries_cbs_init_bind_deferred_push(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_refresh(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_iterate(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_get_string_representation(cbs, path, label, type, idx, elem0, elem1);
|
||||
menu_entries_cbs_init_bind_title(cbs, path, label, type, idx, elem0, elem1);
|
||||
label_hash = djb2_calculate(label);
|
||||
menu_label_hash = djb2_calculate(menu_label);
|
||||
|
||||
menu_entries_cbs_init_bind_ok(cbs, path, label, type, idx, elem0, elem1, menu_label, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_cancel(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_scan(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_start(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_select(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_info(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_content_list_switch(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_up(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_down(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_left(cbs, path, label, type, idx, elem0, elem1, menu_label, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_right(cbs, path, label, type, idx, elem0, elem1, menu_label, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_deferred_push(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_refresh(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_iterate(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_get_string_representation(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
menu_entries_cbs_init_bind_title(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash);
|
||||
}
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include "menu_hash.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -35,67 +37,83 @@ int menu_entries_common_is_settings_entry(const char *label);
|
||||
|
||||
void menu_entries_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label);
|
||||
const char *elem0, const char *elem1, const char *menu_label,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label);
|
||||
const char *elem0, const char *elem1, const char *menu_label,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_refresh(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_up(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_down(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_info(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_start(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_content_list_switch(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_cancel(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label);
|
||||
const char *elem0, const char *elem1, const char *menu_label,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_iterate(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_scan(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
void menu_entries_cbs_init_bind_title(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1);
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash);
|
||||
|
||||
int deferred_push_content_list(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type);
|
||||
|
@ -27,7 +27,8 @@ static int action_cancel_pop_default(const char *path,
|
||||
|
||||
void menu_entries_cbs_init_bind_cancel(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
@ -18,7 +18,8 @@
|
||||
|
||||
void menu_entries_cbs_init_bind_content_list_switch(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_displaylist.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
@ -451,7 +452,8 @@ static int deferred_push_default(menu_displaylist_info_t *info)
|
||||
|
||||
void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
@ -473,113 +475,163 @@ void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
}
|
||||
|
||||
if (strstr(label, "deferred_rdb_entry_detail"))
|
||||
{
|
||||
cbs->action_deferred_push = deferred_push_rdb_entry_detail;
|
||||
#ifdef HAVE_NETWORKING
|
||||
else if (!strcmp(label, "deferred_core_updater_list"))
|
||||
cbs->action_deferred_push = deferred_push_core_updater_list;
|
||||
#endif
|
||||
else if (!strcmp(label, "history_list"))
|
||||
cbs->action_deferred_push = deferred_push_history_list;
|
||||
else if (!strcmp(label, "database_manager_list"))
|
||||
cbs->action_deferred_push = deferred_push_database_manager_list;
|
||||
else if (!strcmp(label, "cursor_manager_list"))
|
||||
cbs->action_deferred_push = deferred_push_cursor_manager_list;
|
||||
else if (!strcmp(label, "cheat_file_load"))
|
||||
cbs->action_deferred_push = deferred_push_cheat_file_load;
|
||||
else if (!strcmp(label, "remap_file_load"))
|
||||
cbs->action_deferred_push = deferred_push_remap_file_load;
|
||||
else if (!strcmp(label, "record_config"))
|
||||
cbs->action_deferred_push = deferred_push_record_configfile;
|
||||
else if (!strcmp(label, "content_actions"))
|
||||
cbs->action_deferred_push = deferred_push_content_actions;
|
||||
else if (!strcmp(label, "shader_options"))
|
||||
cbs->action_deferred_push = deferred_push_shader_options;
|
||||
else if (!strcmp(label, "video_options"))
|
||||
cbs->action_deferred_push = deferred_push_video_options;
|
||||
else if (!strcmp(label, "options"))
|
||||
cbs->action_deferred_push = deferred_push_options;
|
||||
else if (!strcmp(label, "management"))
|
||||
cbs->action_deferred_push = deferred_push_management_options;
|
||||
else if (type == MENU_SETTING_GROUP)
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == MENU_SETTING_GROUP)
|
||||
cbs->action_deferred_push = deferred_push_category;
|
||||
else if (type == MENU_FILE_PLAYLIST_COLLECTION)
|
||||
cbs->action_deferred_push = deferred_push_rdb_collection;
|
||||
else if (!strcmp(label, "deferred_core_list") ||
|
||||
!strcmp(label, "deferred_core_list_set"))
|
||||
cbs->action_deferred_push = deferred_push_core_list_deferred;
|
||||
else if (!strcmp(label, "deferred_video_filter"))
|
||||
cbs->action_deferred_push = deferred_push_video_filter;
|
||||
else if (!strcmp(label, "deferred_database_manager_list"))
|
||||
cbs->action_deferred_push = deferred_push_database_manager_list_deferred;
|
||||
else if (!strcmp(label, "deferred_cursor_manager_list"))
|
||||
cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred;
|
||||
else if (
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_publisher") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_developer") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_origin") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_franchise") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_enhancement_hw") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_esrb_rating") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_bbfc_rating") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_elspa_rating") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_pegi_rating") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_cero_rating") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_edge_magazine_rating") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_edge_magazine_issue") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_famitsu_magazine_rating") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_max_users") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_releasemonth") ||
|
||||
!strcmp(label, "deferred_cursor_manager_list_rdb_entry_releaseyear")
|
||||
)
|
||||
cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred_query_subsearch;
|
||||
else if (!strcmp(label, "core_information"))
|
||||
cbs->action_deferred_push = deferred_push_core_information;
|
||||
else if (!strcmp(label, "system_information"))
|
||||
cbs->action_deferred_push = deferred_push_system_information;
|
||||
else if (!strcmp(label, "performance_counters"))
|
||||
cbs->action_deferred_push = deferred_push_performance_counters;
|
||||
else if (!strcmp(label, "core_counters"))
|
||||
cbs->action_deferred_push = deferred_push_core_counters;
|
||||
else if (!strcmp(label, "video_shader_preset_parameters"))
|
||||
cbs->action_deferred_push = deferred_push_video_shader_preset_parameters;
|
||||
else if (!strcmp(label, "video_shader_parameters"))
|
||||
cbs->action_deferred_push = deferred_push_video_shader_parameters;
|
||||
else if (!strcmp(label, "settings"))
|
||||
cbs->action_deferred_push = deferred_push_settings;
|
||||
else if (!strcmp(label, "frontend_counters"))
|
||||
cbs->action_deferred_push = deferred_push_frontend_counters;
|
||||
else if (!strcmp(label, "core_options"))
|
||||
cbs->action_deferred_push = deferred_push_core_options;
|
||||
else if (!strcmp(label, "core_cheat_options"))
|
||||
cbs->action_deferred_push = deferred_push_core_cheat_options;
|
||||
else if (!strcmp(label, "core_input_remapping_options"))
|
||||
cbs->action_deferred_push = deferred_push_core_input_remapping_options;
|
||||
else if (!strcmp(label, "disk_options"))
|
||||
cbs->action_deferred_push = deferred_push_disk_options;
|
||||
else if (!strcmp(label, "core_list"))
|
||||
cbs->action_deferred_push = deferred_push_core_list;
|
||||
else if (!strcmp(label, "content_collection_list"))
|
||||
cbs->action_deferred_push = deferred_push_content_collection_list;
|
||||
else if (!strcmp(label, "configurations"))
|
||||
cbs->action_deferred_push = deferred_push_configurations;
|
||||
else if (!strcmp(label, "video_shader_preset"))
|
||||
cbs->action_deferred_push = deferred_push_video_shader_preset;
|
||||
else if (!strcmp(label, "video_shader_pass"))
|
||||
cbs->action_deferred_push = deferred_push_video_shader_pass;
|
||||
else if (!strcmp(label, "video_filter"))
|
||||
cbs->action_deferred_push = deferred_push_video_filter;
|
||||
else if (!strcmp(label, "menu_wallpaper"))
|
||||
cbs->action_deferred_push = deferred_push_images;
|
||||
else if (!strcmp(label, "audio_dsp_plugin"))
|
||||
cbs->action_deferred_push = deferred_push_audio_dsp_plugin;
|
||||
else if (!strcmp(label, "input_overlay"))
|
||||
cbs->action_deferred_push = deferred_push_input_overlay;
|
||||
else if (!strcmp(label, "input_osk_overlay"))
|
||||
cbs->action_deferred_push = deferred_push_input_osk_overlay;
|
||||
else if (!strcmp(label, "video_font_path"))
|
||||
cbs->action_deferred_push = deferred_push_video_font_path;
|
||||
else if (!strcmp(label, "content_history_path"))
|
||||
cbs->action_deferred_push = deferred_push_content_history_path;
|
||||
else if (!strcmp(label, "detect_core_list"))
|
||||
cbs->action_deferred_push = deferred_push_detect_core_list;
|
||||
else
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_DEFERRED_CORE_UPDATER_LIST:
|
||||
#ifdef HAVE_NETWORKING
|
||||
cbs->action_deferred_push = deferred_push_core_updater_list;
|
||||
#endif
|
||||
break;
|
||||
case MENU_LABEL_HISTORY_LIST:
|
||||
cbs->action_deferred_push = deferred_push_history_list;
|
||||
break;
|
||||
case MENU_LABEL_DATABASE_MANAGER_LIST:
|
||||
cbs->action_deferred_push = deferred_push_database_manager_list;
|
||||
break;
|
||||
case MENU_LABEL_CURSOR_MANAGER_LIST:
|
||||
cbs->action_deferred_push = deferred_push_cursor_manager_list;
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_LOAD:
|
||||
cbs->action_deferred_push = deferred_push_cheat_file_load;
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_LOAD:
|
||||
cbs->action_deferred_push = deferred_push_remap_file_load;
|
||||
break;
|
||||
case MENU_LABEL_RECORD_CONFIG:
|
||||
cbs->action_deferred_push = deferred_push_record_configfile;
|
||||
break;
|
||||
case MENU_LABEL_CONTENT_ACTIONS:
|
||||
cbs->action_deferred_push = deferred_push_content_actions;
|
||||
break;
|
||||
case MENU_LABEL_SHADER_OPTIONS:
|
||||
cbs->action_deferred_push = deferred_push_shader_options;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_OPTIONS:
|
||||
cbs->action_deferred_push = deferred_push_video_options;
|
||||
break;
|
||||
case MENU_LABEL_OPTIONS:
|
||||
cbs->action_deferred_push = deferred_push_options;
|
||||
break;
|
||||
case MENU_LABEL_MANAGEMENT:
|
||||
cbs->action_deferred_push = deferred_push_management_options;
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CORE_LIST:
|
||||
case MENU_LABEL_DEFERRED_CORE_LIST_SET:
|
||||
cbs->action_deferred_push = deferred_push_core_list_deferred;
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_VIDEO_FILTER:
|
||||
cbs->action_deferred_push = deferred_push_video_filter;
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
|
||||
cbs->action_deferred_push = deferred_push_database_manager_list_deferred;
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
|
||||
cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred;
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH:
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR:
|
||||
cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred_query_subsearch;
|
||||
break;
|
||||
case MENU_LABEL_CORE_INFORMATION:
|
||||
cbs->action_deferred_push = deferred_push_core_information;
|
||||
break;
|
||||
case MENU_LABEL_SYSTEM_INFORMATION:
|
||||
cbs->action_deferred_push = deferred_push_system_information;
|
||||
break;
|
||||
case MENU_LABEL_PERFORMANCE_COUNTERS:
|
||||
cbs->action_deferred_push = deferred_push_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_CORE_COUNTERS:
|
||||
cbs->action_deferred_push = deferred_push_core_counters;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
||||
cbs->action_deferred_push = deferred_push_video_shader_preset_parameters;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
||||
cbs->action_deferred_push = deferred_push_video_shader_parameters;
|
||||
break;
|
||||
case MENU_LABEL_SETTINGS:
|
||||
cbs->action_deferred_push = deferred_push_settings;
|
||||
break;
|
||||
case MENU_LABEL_FRONTEND_COUNTERS:
|
||||
cbs->action_deferred_push = deferred_push_frontend_counters;
|
||||
break;
|
||||
case MENU_LABEL_CORE_OPTIONS:
|
||||
cbs->action_deferred_push = deferred_push_core_options;
|
||||
break;
|
||||
case MENU_LABEL_CORE_CHEAT_OPTIONS:
|
||||
cbs->action_deferred_push = deferred_push_core_cheat_options;
|
||||
break;
|
||||
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
||||
cbs->action_deferred_push = deferred_push_core_input_remapping_options;
|
||||
break;
|
||||
case MENU_LABEL_DISK_OPTIONS:
|
||||
cbs->action_deferred_push = deferred_push_disk_options;
|
||||
break;
|
||||
case MENU_LABEL_CORE_LIST:
|
||||
cbs->action_deferred_push = deferred_push_core_list;
|
||||
break;
|
||||
case MENU_LABEL_CONTENT_COLLECTION_LIST:
|
||||
cbs->action_deferred_push = deferred_push_content_collection_list;
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATIONS:
|
||||
cbs->action_deferred_push = deferred_push_configurations;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET:
|
||||
cbs->action_deferred_push = deferred_push_video_shader_preset;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
cbs->action_deferred_push = deferred_push_video_shader_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER:
|
||||
cbs->action_deferred_push = deferred_push_video_filter;
|
||||
break;
|
||||
case MENU_LABEL_MENU_WALLPAPER:
|
||||
cbs->action_deferred_push = deferred_push_images;
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_DSP_PLUGIN:
|
||||
cbs->action_deferred_push = deferred_push_audio_dsp_plugin;
|
||||
break;
|
||||
case MENU_LABEL_INPUT_OVERLAY:
|
||||
cbs->action_deferred_push = deferred_push_input_overlay;
|
||||
break;
|
||||
case MENU_LABEL_INPUT_OSK_OVERLAY:
|
||||
cbs->action_deferred_push = deferred_push_input_osk_overlay;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FONT_PATH:
|
||||
cbs->action_deferred_push = deferred_push_video_font_path;
|
||||
break;
|
||||
case MENU_LABEL_CONTENT_HISTORY_PATH:
|
||||
cbs->action_deferred_push = deferred_push_content_history_path;
|
||||
break;
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
cbs->action_deferred_push = deferred_push_detect_core_list;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,8 @@ static int action_bind_down_generic(unsigned type, const char *label)
|
||||
|
||||
void menu_entries_cbs_init_bind_down(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
@ -31,7 +31,8 @@ static int action_info_default(unsigned type, const char *label)
|
||||
|
||||
void menu_entries_cbs_init_bind_info(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
@ -14,7 +14,9 @@
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include <rhash.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_display.h"
|
||||
#include "menu_entry.h"
|
||||
@ -263,7 +265,7 @@ static int action_iterate_load_open_zip(const char *label, char *s, size_t len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_iterate_menu_viewport(char *s, size_t len, const char *label, unsigned action)
|
||||
static int action_iterate_menu_viewport(char *s, size_t len, const char *label, unsigned action, uint32_t hash)
|
||||
{
|
||||
int stride_x = 1, stride_y = 1;
|
||||
menu_displaylist_info_t info = {0};
|
||||
@ -344,7 +346,7 @@ static int action_iterate_menu_viewport(char *s, size_t len, const char *label,
|
||||
case MENU_ACTION_CANCEL:
|
||||
menu_list_pop_stack(menu_list);
|
||||
|
||||
if (!strcmp(label, "custom_viewport_2"))
|
||||
if (hash == MENU_LABEL_CUSTOM_VIEWPORT_2)
|
||||
{
|
||||
info.list = menu_list->menu_stack;
|
||||
info.type = MENU_SETTINGS_CUSTOM_VIEWPORT;
|
||||
@ -424,7 +426,7 @@ static int action_iterate_menu_viewport(char *s, size_t len, const char *label,
|
||||
{
|
||||
if (type == MENU_SETTINGS_CUSTOM_VIEWPORT)
|
||||
base_msg = "Set Upper-Left Corner";
|
||||
else if (!strcmp(label, "custom_viewport_2"))
|
||||
else if (hash == MENU_LABEL_CUSTOM_VIEWPORT_2)
|
||||
base_msg = "Set Bottom-Right Corner";
|
||||
|
||||
snprintf(s, len, "%s (%d, %d : %4ux%4u)",
|
||||
@ -457,27 +459,27 @@ enum action_iterate_type
|
||||
ITERATE_TYPE_BIND,
|
||||
};
|
||||
|
||||
enum action_iterate_type action_iterate_type(const char *label)
|
||||
static enum action_iterate_type action_iterate_type(uint32_t hash)
|
||||
{
|
||||
if (!strcmp(label, "help"))
|
||||
return ITERATE_TYPE_HELP;
|
||||
else if (!strcmp(label, "info_screen"))
|
||||
return ITERATE_TYPE_INFO;
|
||||
else if (!strcmp(label, "load_open_zip"))
|
||||
return ITERATE_TYPE_ZIP;
|
||||
else if (!strcmp(label, "message"))
|
||||
return ITERATE_TYPE_MESSAGE;
|
||||
else if (
|
||||
!strcmp(label, "custom_viewport_1") ||
|
||||
!strcmp(label, "custom_viewport_2")
|
||||
)
|
||||
return ITERATE_TYPE_VIEWPORT;
|
||||
else if (
|
||||
!strcmp(label, "custom_bind") ||
|
||||
!strcmp(label, "custom_bind_all") ||
|
||||
!strcmp(label, "custom_bind_defaults")
|
||||
)
|
||||
return ITERATE_TYPE_BIND;
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_HELP:
|
||||
return ITERATE_TYPE_HELP;
|
||||
case MENU_LABEL_INFO_SCREEN:
|
||||
return ITERATE_TYPE_INFO;
|
||||
case MENU_LABEL_LOAD_OPEN_ZIP:
|
||||
return ITERATE_TYPE_ZIP;
|
||||
case MENU_LABEL_MESSAGE:
|
||||
return ITERATE_TYPE_MESSAGE;
|
||||
case MENU_LABEL_CUSTOM_VIEWPORT_1:
|
||||
case MENU_LABEL_CUSTOM_VIEWPORT_2:
|
||||
return ITERATE_TYPE_VIEWPORT;
|
||||
case MENU_LABEL_CUSTOM_BIND:
|
||||
case MENU_LABEL_CUSTOM_BIND_ALL:
|
||||
case MENU_LABEL_CUSTOM_BIND_DEFAULTS:
|
||||
return ITERATE_TYPE_BIND;
|
||||
}
|
||||
|
||||
return ITERATE_TYPE_DEFAULT;
|
||||
}
|
||||
|
||||
@ -495,10 +497,11 @@ static int action_iterate_main(const char *label, unsigned action)
|
||||
int ret = 0;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
uint32_t hash = djb2_calculate(label);
|
||||
if (!menu || !menu_list)
|
||||
return 0;
|
||||
|
||||
iterate_type = action_iterate_type(label);
|
||||
iterate_type = action_iterate_type(hash);
|
||||
|
||||
switch (iterate_type)
|
||||
{
|
||||
@ -514,7 +517,7 @@ static int action_iterate_main(const char *label, unsigned action)
|
||||
menu_list_pop_stack(menu_list);
|
||||
break;
|
||||
case ITERATE_TYPE_VIEWPORT:
|
||||
ret = action_iterate_menu_viewport(msg, sizeof(msg), label, action);
|
||||
ret = action_iterate_menu_viewport(msg, sizeof(msg), label, action, hash);
|
||||
break;
|
||||
case ITERATE_TYPE_INFO:
|
||||
ret = action_iterate_info(msg, sizeof(msg), label);
|
||||
@ -578,7 +581,8 @@ static int action_iterate_main(const char *label, unsigned action)
|
||||
|
||||
void menu_entries_cbs_init_bind_iterate(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (cbs)
|
||||
cbs->action_iterate = action_iterate_main;
|
||||
|
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_setting.h"
|
||||
@ -350,7 +351,8 @@ static int bind_left_generic(unsigned type, const char *label,
|
||||
|
||||
void menu_entries_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label)
|
||||
const char *elem0, const char *elem1, const char *menu_label,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -393,11 +395,16 @@ void menu_entries_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_CHEAT:
|
||||
case MENU_FILE_REMAP:
|
||||
case MENU_SETTING_GROUP:
|
||||
if (!strcmp(menu_label, "Horizontal Menu")
|
||||
|| !strcmp(menu_label, "Main Menu"))
|
||||
cbs->action_left = action_left_mainmenu;
|
||||
else
|
||||
cbs->action_left = action_left_scroll;
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
case MENU_VALUE_MAIN_MENU:
|
||||
cbs->action_left = action_left_mainmenu;
|
||||
break;
|
||||
default:
|
||||
cbs->action_left = action_left_scroll;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MENU_SETTING_ACTION:
|
||||
case MENU_FILE_CONTENTLIST_ENTRY:
|
||||
@ -420,23 +427,35 @@ void menu_entries_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
cbs->action_left = action_left_input_desc;
|
||||
else if (!strcmp(label, "savestate") ||
|
||||
!strcmp(label, "loadstate"))
|
||||
cbs->action_left = action_left_save_state;
|
||||
else if (!strcmp(label, "video_shader_scale_pass"))
|
||||
cbs->action_left = action_left_shader_scale_pass;
|
||||
else if (!strcmp(label, "video_shader_filter_pass"))
|
||||
cbs->action_left = action_left_shader_filter_pass;
|
||||
else if (!strcmp(label, "video_shader_default_filter"))
|
||||
cbs->action_left = action_left_shader_filter_default;
|
||||
else if (!strcmp(label, "video_shader_num_passes"))
|
||||
cbs->action_left = action_left_shader_num_passes;
|
||||
else if (!strcmp(label, "cheat_num_passes"))
|
||||
cbs->action_left = action_left_cheat_num_passes;
|
||||
else if (type == MENU_SETTINGS_VIDEO_RESOLUTION)
|
||||
cbs->action_left = action_left_video_resolution;
|
||||
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
||||
cbs->action_left = core_setting_left;
|
||||
else
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_SAVESTATE:
|
||||
case MENU_LABEL_LOADSTATE:
|
||||
cbs->action_left = action_left_save_state;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
cbs->action_left = action_left_shader_scale_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
cbs->action_left = action_left_shader_filter_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
|
||||
cbs->action_left = action_left_shader_filter_default;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
cbs->action_left = action_left_shader_num_passes;
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_NUM_PASSES:
|
||||
cbs->action_left = action_left_cheat_num_passes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
|
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_display.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
@ -21,6 +22,7 @@
|
||||
#include "menu_entry.h"
|
||||
#include "menu_shader.h"
|
||||
#include "menu_navigation.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../runloop_data.h"
|
||||
@ -1398,165 +1400,176 @@ static int action_ok_video_resolution(const char *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_rdb_entry(const char *label)
|
||||
static int is_rdb_entry(uint32_t label_hash)
|
||||
{
|
||||
return (
|
||||
!(strcmp(label, "rdb_entry_publisher")) ||
|
||||
!(strcmp(label, "rdb_entry_developer")) ||
|
||||
!(strcmp(label, "rdb_entry_origin")) ||
|
||||
!(strcmp(label, "rdb_entry_franchise")) ||
|
||||
!(strcmp(label, "rdb_entry_enhancement_hw")) ||
|
||||
!(strcmp(label, "rdb_entry_esrb_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_bbfc_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_elspa_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_pegi_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_cero_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_edge_magazine_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_edge_magazine_issue")) ||
|
||||
!(strcmp(label, "rdb_entry_famitsu_magazine_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_releasemonth")) ||
|
||||
!(strcmp(label, "rdb_entry_releaseyear")) ||
|
||||
!(strcmp(label, "rdb_entry_max_users"))
|
||||
);
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label)
|
||||
{
|
||||
rarch_setting_t *setting = menu_setting_find(label);
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
||||
if (!cbs)
|
||||
return;
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("path: %s, label: %s, elem0 : %s, elem1: %s\n", path, label, elem0, elem1);
|
||||
#endif
|
||||
|
||||
cbs->action_ok = action_ok_lookup_setting;
|
||||
|
||||
if (elem0[0] != '\0' && is_rdb_entry(elem0))
|
||||
switch (label_hash)
|
||||
{
|
||||
cbs->action_ok = action_ok_rdb_entry_submenu;
|
||||
return;
|
||||
case MENU_LABEL_RDB_ENTRY_PUBLISHER:
|
||||
case MENU_LABEL_RDB_ENTRY_DEVELOPER:
|
||||
case MENU_LABEL_RDB_ENTRY_ORIGIN:
|
||||
case MENU_LABEL_RDB_ENTRY_FRANCHISE:
|
||||
case MENU_LABEL_RDB_ENTRY_ENHANCEMENT_HW:
|
||||
case MENU_LABEL_RDB_ENTRY_ESRB_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_BBFC_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_ELSPA_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_PEGI_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_CERO_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_ISSUE:
|
||||
case MENU_LABEL_RDB_ENTRY_FAMITSU_MAGAZINE_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_RELEASE_MONTH:
|
||||
case MENU_LABEL_RDB_ENTRY_RELEASE_YEAR:
|
||||
case MENU_LABEL_RDB_ENTRY_MAX_USERS:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!strcmp(label, "custom_bind_all"))
|
||||
cbs->action_ok = action_ok_lookup_setting;
|
||||
else if (type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD ||
|
||||
type == MENU_SETTINGS_CUSTOM_BIND)
|
||||
cbs->action_ok = action_ok_lookup_setting;
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
cbs->action_ok = NULL;
|
||||
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PRESET_PARAMETER_LAST)
|
||||
cbs->action_ok = NULL;
|
||||
else if (type >= MENU_SETTINGS_CHEAT_BEGIN
|
||||
&& type <= MENU_SETTINGS_CHEAT_END)
|
||||
cbs->action_ok = action_ok_cheat;
|
||||
else if (!strcmp(label, "savestate"))
|
||||
cbs->action_ok = action_ok_save_state;
|
||||
else if (!strcmp(label, "loadstate"))
|
||||
cbs->action_ok = action_ok_load_state;
|
||||
else if (!strcmp(label, "resume_content"))
|
||||
cbs->action_ok = action_ok_resume_content;
|
||||
else if (!strcmp(label, "restart_content"))
|
||||
cbs->action_ok = action_ok_restart_content;
|
||||
else if (!strcmp(label, "take_screenshot"))
|
||||
cbs->action_ok = action_ok_screenshot;
|
||||
else if (!strcmp(label, "file_load_or_resume"))
|
||||
cbs->action_ok = action_ok_file_load_or_resume;
|
||||
else if (!strcmp(label, "quit_retroarch"))
|
||||
cbs->action_ok = action_ok_quit;
|
||||
else if (!strcmp(label, "unload_core"))
|
||||
cbs->action_ok = action_ok_unload_core;
|
||||
else if (!strcmp(label, "save_new_config"))
|
||||
cbs->action_ok = action_ok_save_new_config;
|
||||
else if (!strcmp(label, "help"))
|
||||
cbs->action_ok = action_ok_help;
|
||||
else if (!strcmp(label, "video_shader_pass"))
|
||||
cbs->action_ok = action_ok_shader_pass;
|
||||
else if (!strcmp(label, "video_shader_preset"))
|
||||
cbs->action_ok = action_ok_shader_preset;
|
||||
else if (!strcmp(label, "cheat_file_load"))
|
||||
cbs->action_ok = action_ok_cheat_file;
|
||||
else if (!strcmp(label, "audio_dsp_plugin"))
|
||||
cbs->action_ok = action_ok_audio_dsp_plugin;
|
||||
else if (!strcmp(label, "video_filter"))
|
||||
cbs->action_ok = action_ok_video_filter;
|
||||
else if (!strcmp(label, "remap_file_load"))
|
||||
cbs->action_ok = action_ok_remap_file;
|
||||
else if (!strcmp(label, "record_config"))
|
||||
cbs->action_ok = action_ok_record_configfile;
|
||||
else if (!strcmp(label, "core_updater_list"))
|
||||
cbs->action_ok = action_ok_core_updater_list;
|
||||
else if (!strcmp(label, "video_shader_parameters") ||
|
||||
!strcmp(label, "video_shader_preset_parameters")
|
||||
)
|
||||
cbs->action_ok = action_ok_shader_parameters;
|
||||
else if (
|
||||
!strcmp(label, "shader_options") ||
|
||||
!strcmp(label, "video_options") ||
|
||||
!strcmp(label, "Input Settings") ||
|
||||
!strcmp(label, "core_options") ||
|
||||
!strcmp(label, "core_cheat_options") ||
|
||||
!strcmp(label, "core_input_remapping_options") ||
|
||||
!strcmp(label, "core_information") ||
|
||||
!strcmp(label, "system_information") ||
|
||||
!strcmp(label, "disk_options") ||
|
||||
!strcmp(label, "settings") ||
|
||||
!strcmp(label, "performance_counters") ||
|
||||
!strcmp(label, "frontend_counters") ||
|
||||
!strcmp(label, "core_counters") ||
|
||||
!strcmp(label, "management") ||
|
||||
!strcmp(label, "options")
|
||||
)
|
||||
cbs->action_ok = action_ok_push_default;
|
||||
else if (
|
||||
!strcmp(label, "load_content") ||
|
||||
!strcmp(label, "detect_core_list")
|
||||
)
|
||||
cbs->action_ok = action_ok_push_content_list;
|
||||
else if (!strcmp(label, "history_list") ||
|
||||
!strcmp(label, "cursor_manager_list") ||
|
||||
!strcmp(label, "database_manager_list") ||
|
||||
(setting && setting->browser_selection_type == ST_DIR)
|
||||
)
|
||||
cbs->action_ok = action_ok_push_generic_list;
|
||||
else if (!strcmp(label, "shader_apply_changes"))
|
||||
cbs->action_ok = action_ok_shader_apply_changes;
|
||||
else if (!strcmp(label, "cheat_apply_changes"))
|
||||
cbs->action_ok = action_ok_cheat_apply_changes;
|
||||
else if (!strcmp(label, "video_shader_preset_save_as"))
|
||||
cbs->action_ok = action_ok_shader_preset_save_as;
|
||||
else if (!strcmp(label, "cheat_file_save_as"))
|
||||
cbs->action_ok = action_ok_cheat_file_save_as;
|
||||
else if (!strcmp(label, "remap_file_save_as"))
|
||||
cbs->action_ok = action_ok_remap_file_save_as;
|
||||
else if (!strcmp(label, "remap_file_save_core"))
|
||||
cbs->action_ok = action_ok_remap_file_save_core;
|
||||
else if (!strcmp(label, "remap_file_save_game"))
|
||||
cbs->action_ok = action_ok_remap_file_save_game;
|
||||
else if (!strcmp(label, "content_collection_list"))
|
||||
cbs->action_ok = action_ok_content_collection_list;
|
||||
else if (!strcmp(label, "core_list"))
|
||||
cbs->action_ok = action_ok_core_list;
|
||||
else if (!strcmp(label, "disk_image_append"))
|
||||
cbs->action_ok = action_ok_disk_image_append_list;
|
||||
else if (!strcmp(label, "configurations"))
|
||||
cbs->action_ok = action_ok_configurations_list;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_entries_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_CUSTOM_BIND_ALL:
|
||||
cbs->action_ok = action_ok_lookup_setting;
|
||||
break;
|
||||
case MENU_LABEL_SAVESTATE:
|
||||
cbs->action_ok = action_ok_save_state;
|
||||
break;
|
||||
case MENU_LABEL_LOADSTATE:
|
||||
cbs->action_ok = action_ok_load_state;
|
||||
break;
|
||||
case MENU_LABEL_RESUME_CONTENT:
|
||||
cbs->action_ok = action_ok_resume_content;
|
||||
break;
|
||||
case MENU_LABEL_RESTART_CONTENT:
|
||||
cbs->action_ok = action_ok_restart_content;
|
||||
break;
|
||||
case MENU_LABEL_TAKE_SCREENSHOT:
|
||||
cbs->action_ok = action_ok_screenshot;
|
||||
break;
|
||||
case MENU_LABEL_FILE_LOAD_OR_RESUME:
|
||||
cbs->action_ok = action_ok_file_load_or_resume;
|
||||
break;
|
||||
case MENU_LABEL_QUIT_RETROARCH:
|
||||
cbs->action_ok = action_ok_quit;
|
||||
break;
|
||||
case MENU_LABEL_UNLOAD_CORE:
|
||||
cbs->action_ok = action_ok_unload_core;
|
||||
break;
|
||||
case MENU_LABEL_SAVE_NEW_CONFIG:
|
||||
cbs->action_ok = action_ok_save_new_config;
|
||||
break;
|
||||
case MENU_LABEL_HELP:
|
||||
cbs->action_ok = action_ok_help;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
cbs->action_ok = action_ok_shader_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET:
|
||||
cbs->action_ok = action_ok_shader_preset;
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_LOAD:
|
||||
cbs->action_ok = action_ok_cheat_file;
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_DSP_PLUGIN:
|
||||
cbs->action_ok = action_ok_audio_dsp_plugin;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER:
|
||||
cbs->action_ok = action_ok_video_filter;
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_LOAD:
|
||||
cbs->action_ok = action_ok_remap_file;
|
||||
break;
|
||||
case MENU_LABEL_RECORD_CONFIG:
|
||||
cbs->action_ok = action_ok_record_configfile;
|
||||
break;
|
||||
case MENU_LABEL_CORE_UPDATER_LIST:
|
||||
cbs->action_ok = action_ok_core_updater_list;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
||||
cbs->action_ok = action_ok_shader_parameters;
|
||||
break;
|
||||
case MENU_LABEL_SHADER_OPTIONS:
|
||||
case MENU_LABEL_VIDEO_OPTIONS:
|
||||
case MENU_VALUE_INPUT_SETTINGS:
|
||||
case MENU_LABEL_CORE_OPTIONS:
|
||||
case MENU_LABEL_CORE_CHEAT_OPTIONS:
|
||||
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
||||
case MENU_LABEL_CORE_INFORMATION:
|
||||
case MENU_LABEL_SYSTEM_INFORMATION:
|
||||
case MENU_LABEL_DISK_OPTIONS:
|
||||
case MENU_LABEL_SETTINGS:
|
||||
case MENU_LABEL_PERFORMANCE_COUNTERS:
|
||||
case MENU_LABEL_FRONTEND_COUNTERS:
|
||||
case MENU_LABEL_CORE_COUNTERS:
|
||||
case MENU_LABEL_MANAGEMENT:
|
||||
case MENU_LABEL_OPTIONS:
|
||||
cbs->action_ok = action_ok_push_default;
|
||||
break;
|
||||
case MENU_LABEL_LOAD_CONTENT:
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
cbs->action_ok = action_ok_push_content_list;
|
||||
break;
|
||||
case MENU_LABEL_HISTORY_LIST:
|
||||
case MENU_LABEL_CURSOR_MANAGER_LIST:
|
||||
case MENU_LABEL_DATABASE_MANAGER_LIST:
|
||||
cbs->action_ok = action_ok_push_generic_list;
|
||||
break;
|
||||
case MENU_LABEL_SHADER_APPLY_CHANGES:
|
||||
cbs->action_ok = action_ok_shader_apply_changes;
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_APPLY_CHANGES:
|
||||
cbs->action_ok = action_ok_cheat_apply_changes;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS:
|
||||
cbs->action_ok = action_ok_shader_preset_save_as;
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_SAVE_AS:
|
||||
cbs->action_ok = action_ok_cheat_file_save_as;
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_SAVE_AS:
|
||||
cbs->action_ok = action_ok_remap_file_save_as;
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_SAVE_CORE:
|
||||
cbs->action_ok = action_ok_remap_file_save_core;
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_SAVE_GAME:
|
||||
cbs->action_ok = action_ok_remap_file_save_game;
|
||||
break;
|
||||
case MENU_LABEL_CONTENT_COLLECTION_LIST:
|
||||
cbs->action_ok = action_ok_content_collection_list;
|
||||
break;
|
||||
case MENU_LABEL_CORE_LIST:
|
||||
cbs->action_ok = action_ok_core_list;
|
||||
break;
|
||||
case MENU_LABEL_DISK_IMAGE_APPEND:
|
||||
cbs->action_ok = action_ok_disk_image_append_list;
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATIONS:
|
||||
cbs->action_ok = action_ok_configurations_list;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_entries_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
uint32_t label_hash, uint32_t menu_label_hash, unsigned type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MENU_SETTINGS_VIDEO_RESOLUTION:
|
||||
cbs->action_ok = action_ok_video_resolution;
|
||||
break;
|
||||
case MENU_FILE_PLAYLIST_ENTRY:
|
||||
cbs->action_ok = action_ok_playlist_entry;
|
||||
cbs->action_ok = action_ok_playlist_entry;
|
||||
break;
|
||||
case MENU_FILE_PLAYLIST_COLLECTION:
|
||||
cbs->action_ok = action_ok_playlist_collection;
|
||||
@ -1595,16 +1608,23 @@ void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
cbs->action_ok = action_ok_compressed_archive_push;
|
||||
break;
|
||||
case MENU_FILE_CORE:
|
||||
if (!strcmp(menu_label, "deferred_core_list"))
|
||||
if (label_hash == MENU_LABEL_DEFERRED_CORE_LIST)
|
||||
cbs->action_ok = action_ok_core_load_deferred;
|
||||
else if (!strcmp(menu_label, "deferred_core_list_set"))
|
||||
cbs->action_ok = action_ok_core_deferred_set;
|
||||
else if (!strcmp(menu_label, "core_list"))
|
||||
cbs->action_ok = action_ok_core_load;
|
||||
else if (!strcmp(menu_label, "core_updater_list"))
|
||||
cbs->action_ok = action_ok_core_download;
|
||||
else
|
||||
return;
|
||||
{
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_LABEL_DEFERRED_CORE_LIST_SET:
|
||||
cbs->action_ok = action_ok_core_deferred_set;
|
||||
break;
|
||||
case MENU_LABEL_CORE_LIST:
|
||||
cbs->action_ok = action_ok_core_load;
|
||||
break;
|
||||
case MENU_LABEL_CORE_UPDATER_LIST:
|
||||
cbs->action_ok = action_ok_core_download;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MENU_FILE_DOWNLOAD_CORE:
|
||||
cbs->action_ok = action_ok_core_updater_download;
|
||||
@ -1612,22 +1632,30 @@ void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_DOWNLOAD_CORE_INFO:
|
||||
break;
|
||||
case MENU_FILE_RDB:
|
||||
if (!strcmp(menu_label, "deferred_database_manager_list"))
|
||||
cbs->action_ok = action_ok_database_manager_list_deferred;
|
||||
else if (!strcmp(menu_label, "database_manager_list")
|
||||
|| !strcmp(menu_label, "Horizontal Menu"))
|
||||
cbs->action_ok = action_ok_database_manager_list;
|
||||
else
|
||||
return;
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
|
||||
cbs->action_ok = action_ok_database_manager_list_deferred;
|
||||
break;
|
||||
case MENU_LABEL_DATABASE_MANAGER_LIST:
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
cbs->action_ok = action_ok_database_manager_list;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MENU_FILE_RDB_ENTRY:
|
||||
cbs->action_ok = action_ok_rdb_entry;
|
||||
break;
|
||||
case MENU_FILE_CURSOR:
|
||||
if (!strcmp(menu_label, "deferred_database_manager_list"))
|
||||
cbs->action_ok = action_ok_cursor_manager_list_deferred;
|
||||
else if (!strcmp(menu_label, "cursor_manager_list"))
|
||||
cbs->action_ok = action_ok_cursor_manager_list;
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
|
||||
cbs->action_ok = action_ok_cursor_manager_list_deferred;
|
||||
break;
|
||||
case MENU_LABEL_CURSOR_MANAGER_LIST:
|
||||
cbs->action_ok = action_ok_cursor_manager_list;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MENU_FILE_FONT:
|
||||
case MENU_FILE_OVERLAY:
|
||||
@ -1641,12 +1669,18 @@ void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_IN_CARCHIVE:
|
||||
#endif
|
||||
case MENU_FILE_PLAIN:
|
||||
if (!strcmp(menu_label, "detect_core_list"))
|
||||
cbs->action_ok = action_ok_file_load_with_detect_core;
|
||||
else if (!strcmp(menu_label, "disk_image_append"))
|
||||
cbs->action_ok = action_ok_disk_image_append;
|
||||
else
|
||||
cbs->action_ok = action_ok_file_load;
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
cbs->action_ok = action_ok_file_load_with_detect_core;
|
||||
break;
|
||||
case MENU_LABEL_DISK_IMAGE_APPEND:
|
||||
cbs->action_ok = action_ok_disk_image_append;
|
||||
break;
|
||||
default:
|
||||
cbs->action_ok = action_ok_file_load;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MENU_SETTINGS_CUSTOM_VIEWPORT:
|
||||
cbs->action_ok = action_ok_custom_viewport;
|
||||
@ -1660,6 +1694,56 @@ void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
cbs->action_ok = action_ok_disk_cycle_tray_status;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
rarch_setting_t *setting = menu_setting_find(label);
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
||||
if (!cbs || !menu)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("path: %s, label: %s, elem0 : %s, elem1: %s\n", path, label, elem0, elem1);
|
||||
#endif
|
||||
|
||||
cbs->action_ok = action_ok_lookup_setting;
|
||||
|
||||
if (elem0[0] != '\0' && (is_rdb_entry(label_hash) == 0))
|
||||
{
|
||||
cbs->action_ok = action_ok_rdb_entry_submenu;
|
||||
return;
|
||||
}
|
||||
|
||||
if (setting && setting->browser_selection_type == ST_DIR)
|
||||
{
|
||||
cbs->action_ok = action_ok_push_generic_list;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD ||
|
||||
type == MENU_SETTINGS_CUSTOM_BIND)
|
||||
cbs->action_ok = action_ok_lookup_setting;
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
cbs->action_ok = NULL;
|
||||
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PRESET_PARAMETER_LAST)
|
||||
cbs->action_ok = NULL;
|
||||
else if (type >= MENU_SETTINGS_CHEAT_BEGIN
|
||||
&& type <= MENU_SETTINGS_CHEAT_END)
|
||||
cbs->action_ok = action_ok_cheat;
|
||||
else if (menu_entries_cbs_init_bind_ok_compare_label(cbs, label_hash) == 0)
|
||||
return;
|
||||
|
||||
menu_entries_cbs_init_bind_ok_compare_type(cbs, label_hash, menu_label_hash, type);
|
||||
}
|
||||
|
@ -24,7 +24,8 @@ static int action_refresh_default(file_list_t *list, file_list_t *menu_list)
|
||||
|
||||
void menu_entries_cbs_init_bind_refresh(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (cbs)
|
||||
cbs->action_refresh = action_refresh_default;
|
||||
|
@ -14,6 +14,8 @@
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include <rhash.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_shader.h"
|
||||
@ -762,15 +764,18 @@ static void menu_action_setting_disp_set_label(file_list_t* list,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
uint32_t hash_label = djb2_calculate(label);
|
||||
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
|
||||
if (!strcmp(label, "performance_counters"))
|
||||
*w = strlen(label);
|
||||
|
||||
if (!strcmp(label, "history_list"))
|
||||
*w = strlen(label);
|
||||
switch (hash_label)
|
||||
{
|
||||
case MENU_LABEL_PERFORMANCE_COUNTERS:
|
||||
case MENU_LABEL_HISTORY_LIST:
|
||||
*w = strlen(label);
|
||||
break;
|
||||
}
|
||||
|
||||
if (type >= MENU_SETTINGS_CORE_OPTION_START)
|
||||
strlcpy(
|
||||
@ -785,9 +790,58 @@ static void menu_action_setting_disp_set_label(file_list_t* list,
|
||||
strlcpy(s2, path, len2);
|
||||
}
|
||||
|
||||
static int menu_entries_cbs_init_bind_get_string_representation_compare_label(
|
||||
menu_file_list_cbs_t *cbs, uint32_t label_hash)
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_CHEAT_NUM_PASSES:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_cheat_num_passes;
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_LOAD:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_remap_file_load;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_filter_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_scale_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_num_passes;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_default_filter;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_filter;
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATIONS:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_configurations;
|
||||
break;
|
||||
default:
|
||||
return - 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
@ -816,124 +870,97 @@ void menu_entries_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_parameter;
|
||||
else if (!strcmp(label, "cheat_num_passes"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_cheat_num_passes;
|
||||
else if (!strcmp(label, "remap_file_load"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_remap_file_load;
|
||||
else if (!strcmp(label, "video_shader_filter_pass"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_filter_pass;
|
||||
else if (!strcmp(label, "video_shader_scale_pass"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_scale_pass;
|
||||
else if (!strcmp(label, "video_shader_num_passes"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_num_passes;
|
||||
else if (!strcmp(label, "video_shader_pass"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_pass;
|
||||
else if (!strcmp(label, "video_shader_default_filter"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_shader_default_filter;
|
||||
else if (!strcmp(label, "video_filter"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_filter;
|
||||
else if (!strcmp(label, "configurations"))
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_configurations;
|
||||
else
|
||||
else if (menu_entries_cbs_init_bind_get_string_representation_compare_label(cbs, label_hash) == 0)
|
||||
return;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MENU_FILE_CORE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_core;
|
||||
break;
|
||||
case MENU_FILE_PLAIN:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_plain;
|
||||
break;
|
||||
case MENU_FILE_IMAGE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_image;
|
||||
break;
|
||||
case MENU_FILE_USE_DIRECTORY:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_use_directory;
|
||||
break;
|
||||
case MENU_FILE_DIRECTORY:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_directory;
|
||||
break;
|
||||
case MENU_FILE_CARCHIVE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_carchive;
|
||||
break;
|
||||
case MENU_FILE_OVERLAY:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_overlay;
|
||||
break;
|
||||
case MENU_FILE_FONT:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_font;
|
||||
break;
|
||||
case MENU_FILE_SHADER:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_shader;
|
||||
break;
|
||||
case MENU_FILE_SHADER_PRESET:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_shader_preset;
|
||||
break;
|
||||
case MENU_FILE_CONFIG:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_config;
|
||||
break;
|
||||
case MENU_FILE_IN_CARCHIVE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_in_carchive;
|
||||
break;
|
||||
case MENU_FILE_VIDEOFILTER:
|
||||
case MENU_FILE_AUDIOFILTER:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_filter;
|
||||
break;
|
||||
case MENU_FILE_DOWNLOAD_CORE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_url;
|
||||
break;
|
||||
case MENU_FILE_RDB:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_rdb;
|
||||
break;
|
||||
case MENU_FILE_CURSOR:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_cursor;
|
||||
break;
|
||||
case MENU_FILE_CHEAT:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_cheat;
|
||||
break;
|
||||
case MENU_SETTING_SUBGROUP:
|
||||
case MENU_SETTINGS_CUSTOM_VIEWPORT:
|
||||
case MENU_SETTINGS_CUSTOM_BIND_ALL:
|
||||
case MENU_SETTINGS_CUSTOM_BIND_DEFAULT_ALL:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_more;
|
||||
break;
|
||||
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_disk_index;
|
||||
break;
|
||||
case MENU_SETTINGS_VIDEO_RESOLUTION:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_video_resolution;
|
||||
break;
|
||||
default:
|
||||
cbs->action_get_representation = menu_action_setting_disp_set_label;
|
||||
break;
|
||||
}
|
||||
case MENU_FILE_CORE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_core;
|
||||
break;
|
||||
case MENU_FILE_PLAIN:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_plain;
|
||||
break;
|
||||
case MENU_FILE_IMAGE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_image;
|
||||
break;
|
||||
case MENU_FILE_USE_DIRECTORY:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_use_directory;
|
||||
break;
|
||||
case MENU_FILE_DIRECTORY:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_directory;
|
||||
break;
|
||||
case MENU_FILE_CARCHIVE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_carchive;
|
||||
break;
|
||||
case MENU_FILE_OVERLAY:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_overlay;
|
||||
break;
|
||||
case MENU_FILE_FONT:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_font;
|
||||
break;
|
||||
case MENU_FILE_SHADER:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_shader;
|
||||
break;
|
||||
case MENU_FILE_SHADER_PRESET:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_shader_preset;
|
||||
break;
|
||||
case MENU_FILE_CONFIG:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_config;
|
||||
break;
|
||||
case MENU_FILE_IN_CARCHIVE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_in_carchive;
|
||||
break;
|
||||
case MENU_FILE_VIDEOFILTER:
|
||||
case MENU_FILE_AUDIOFILTER:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_filter;
|
||||
break;
|
||||
case MENU_FILE_DOWNLOAD_CORE:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_url;
|
||||
break;
|
||||
case MENU_FILE_RDB:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_rdb;
|
||||
break;
|
||||
case MENU_FILE_CURSOR:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_cursor;
|
||||
break;
|
||||
case MENU_FILE_CHEAT:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_file_cheat;
|
||||
break;
|
||||
case MENU_SETTING_SUBGROUP:
|
||||
case MENU_SETTINGS_CUSTOM_VIEWPORT:
|
||||
case MENU_SETTINGS_CUSTOM_BIND_ALL:
|
||||
case MENU_SETTINGS_CUSTOM_BIND_DEFAULT_ALL:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_more;
|
||||
break;
|
||||
case MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_disk_index;
|
||||
break;
|
||||
case MENU_SETTINGS_VIDEO_RESOLUTION:
|
||||
cbs->action_get_representation =
|
||||
menu_action_setting_disp_set_label_menu_video_resolution;
|
||||
break;
|
||||
default:
|
||||
cbs->action_get_representation = menu_action_setting_disp_set_label;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_setting.h"
|
||||
@ -353,7 +354,8 @@ static int bind_right_generic(unsigned type, const char *label,
|
||||
|
||||
void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label)
|
||||
const char *elem0, const char *elem1, const char *menu_label,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -396,12 +398,16 @@ void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_CHEAT:
|
||||
case MENU_FILE_REMAP:
|
||||
case MENU_SETTING_GROUP:
|
||||
if (!strcmp(menu_label, "Horizontal Menu")
|
||||
|| !strcmp(menu_label, "Main Menu"))
|
||||
cbs->action_right = action_right_mainmenu;
|
||||
else
|
||||
cbs->action_right = action_right_scroll;
|
||||
break;
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
case MENU_VALUE_MAIN_MENU:
|
||||
cbs->action_right = action_right_mainmenu;
|
||||
break;
|
||||
default:
|
||||
cbs->action_right = action_right_scroll;
|
||||
break;
|
||||
}
|
||||
case MENU_SETTING_ACTION:
|
||||
case MENU_FILE_CONTENTLIST_ENTRY:
|
||||
cbs->action_right = action_right_mainmenu;
|
||||
@ -423,23 +429,35 @@ void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
cbs->action_right = action_right_input_desc;
|
||||
else if (!strcmp(label, "savestate") ||
|
||||
!strcmp(label, "loadstate"))
|
||||
cbs->action_right = action_right_save_state;
|
||||
else if (!strcmp(label, "video_shader_scale_pass"))
|
||||
cbs->action_right = action_right_shader_scale_pass;
|
||||
else if (!strcmp(label, "video_shader_filter_pass"))
|
||||
cbs->action_right = action_right_shader_filter_pass;
|
||||
else if (!strcmp(label, "video_shader_default_filter"))
|
||||
cbs->action_right = action_right_shader_filter_default;
|
||||
else if (!strcmp(label, "video_shader_num_passes"))
|
||||
cbs->action_right = action_right_shader_num_passes;
|
||||
else if (!strcmp(label, "cheat_num_passes"))
|
||||
cbs->action_right = action_right_cheat_num_passes;
|
||||
else if (type == MENU_SETTINGS_VIDEO_RESOLUTION)
|
||||
cbs->action_right = action_right_video_resolution;
|
||||
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
||||
cbs->action_right = core_setting_right;
|
||||
else
|
||||
{
|
||||
switch (label_hash)
|
||||
{
|
||||
case MENU_LABEL_SAVESTATE:
|
||||
case MENU_LABEL_LOADSTATE:
|
||||
cbs->action_right = action_right_save_state;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
cbs->action_right = action_right_shader_scale_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
cbs->action_right = action_right_shader_filter_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
|
||||
cbs->action_right = action_right_shader_filter_default;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
cbs->action_right = action_right_shader_num_passes;
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_NUM_PASSES:
|
||||
cbs->action_right = action_right_cheat_num_passes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
|
@ -42,7 +42,8 @@ static int action_scan_directory(const char *path,
|
||||
|
||||
void menu_entries_cbs_init_bind_scan(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
@ -59,7 +59,8 @@ static int action_select_directory(const char *path, const char *label, unsigned
|
||||
|
||||
void menu_entries_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
@ -264,30 +264,53 @@ static int action_start_lookup_setting(unsigned type, const char *label)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int menu_entries_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs,
|
||||
uint32_t hash)
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_REMAP_FILE_LOAD:
|
||||
cbs->action_start = action_start_remap_file_load;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER:
|
||||
cbs->action_start = action_start_video_filter_file_load;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
cbs->action_start = action_start_shader_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
cbs->action_start = action_start_shader_scale_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
cbs->action_start = action_start_shader_filter_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
cbs->action_start = action_start_shader_num_passes;
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_NUM_PASSES:
|
||||
cbs->action_start = action_start_cheat_num_passes;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void menu_entries_cbs_init_bind_start(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
||||
cbs->action_start = action_start_lookup_setting;
|
||||
|
||||
if (menu_entries_cbs_init_bind_start_compare_label(cbs, label_hash) == 0)
|
||||
return;
|
||||
|
||||
if (!strcmp(label, "remap_file_load"))
|
||||
cbs->action_start = action_start_remap_file_load;
|
||||
if (!strcmp(label, "video_filter"))
|
||||
cbs->action_start = action_start_video_filter_file_load;
|
||||
else if (!strcmp(label, "video_shader_pass"))
|
||||
cbs->action_start = action_start_shader_pass;
|
||||
else if (!strcmp(label, "video_shader_scale_pass"))
|
||||
cbs->action_start = action_start_shader_scale_pass;
|
||||
else if (!strcmp(label, "video_shader_filter_pass"))
|
||||
cbs->action_start = action_start_shader_filter_pass;
|
||||
else if (!strcmp(label, "video_shader_num_passes"))
|
||||
cbs->action_start = action_start_shader_num_passes;
|
||||
else if (!strcmp(label, "cheat_num_passes"))
|
||||
cbs->action_start = action_start_cheat_num_passes;
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
cbs->action_start = action_start_shader_action_parameter;
|
||||
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
|
||||
|
@ -20,102 +20,7 @@
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
|
||||
#include "hash.h"
|
||||
|
||||
#define MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST 0x7c0b704fU
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST 0x45446638U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER 0xcbd89be5U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER 0x125e594dU
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN 0x4ebaa767U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE 0x77f9eff2U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING 0x1c7f8a43U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE 0xaaeebde7U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH 0x2b36ce66U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR 0x9c7c6e91U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING 0x68eba20fU
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING 0x8bf6ab18U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING 0x5fc77328U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING 0x24f6172cU
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING 0x0a8e67f0U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS 0xbfcba816U
|
||||
#define MENU_LABEL_DEFERRED_RDB_ENTRY_DETAIL 0xc35416c0U
|
||||
#define MENU_LABEL_DEFERRED_CORE_LIST 0xf157d289U
|
||||
#define MENU_LABEL_CONFIGURATIONS 0x3e930a50U
|
||||
#define MENU_LABEL_DISK_IMAGE_APPEND 0x5af7d709U
|
||||
#define MENU_LABEL_PERFORMANCE_COUNTERS 0xd8ab5049U
|
||||
#define MENU_LABEL_CORE_LIST 0xa8c3bfc9U
|
||||
#define MENU_LABEL_MANAGEMENT 0xb8137ec2U
|
||||
#define MENU_LABEL_OPTIONS 0x71f05091U
|
||||
#define MENU_LABEL_SETTINGS 0x1304dc16U
|
||||
#define MENU_LABEL_FRONTEND_COUNTERS 0xe5696877U
|
||||
#define MENU_LABEL_CORE_COUNTERS 0x64cc83e0U
|
||||
#define MENU_LABEL_HISTORY_LIST 0x60d82032U
|
||||
#define MENU_LABEL_INFO_SCREEN 0xd97853d0U
|
||||
#define MENU_LABEL_SYSTEM_INFORMATION 0x206ebf0fU
|
||||
#define MENU_LABEL_CORE_INFORMATION 0xb638e0d3U
|
||||
#define MENU_LABEL_VIDEO_SHADER_PARAMETERS 0x9895c3e5U
|
||||
#define MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS 0xd18158d7U
|
||||
#define MENU_LABEL_DISK_OPTIONS 0xc61ab5fbU
|
||||
#define MENU_LABEL_CORE_OPTIONS 0xf65e60f9U
|
||||
#define MENU_LABEL_SHADER_OPTIONS 0x1f7d2fc7U
|
||||
#define MENU_LABEL_VIDEO_OPTIONS 0x6390c4e7U
|
||||
#define MENU_LABEL_CORE_CHEAT_OPTIONS 0x9293171dU
|
||||
#define MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS 0x7836a8caU
|
||||
#define MENU_LABEL_DATABASE_MANAGER_LIST 0x7f853d8fU
|
||||
#define MENU_LABEL_CURSOR_MANAGER_LIST 0xa969e378U
|
||||
#define MENU_LABEL_DEFERRED_CORE_UPDATER_LIST 0xbd4d493dU
|
||||
#define MENU_LABEL_VIDEO_SHADER_PASS 0x4fa31028U
|
||||
#define MENU_LABEL_VIDEO_SHADER_PRESET 0xc5d3bae4U
|
||||
#define MENU_LABEL_CHEAT_FILE_LOAD 0x57336148U
|
||||
#define MENU_LABEL_REMAP_FILE_LOAD 0x9c2799b8U
|
||||
#define MENU_LABEL_CUSTOM_VIEWPORT_2 0x76c30170U
|
||||
#define MENU_LABEL_HELP 0x7c97d2eeU
|
||||
#define MENU_LABEL_INPUT_OVERLAY 0x24e24796U
|
||||
#define MENU_LABEL_VIDEO_FONT_PATH 0xd0de729eU
|
||||
#define MENU_LABEL_VIDEO_FILTER 0x1c0eb741U
|
||||
#define MENU_LABEL_AUDIO_DSP_PLUGIN 0x4a69572bU
|
||||
#define MENU_LABEL_RGUI_BROWSER_DIRECTORY 0xa86cba73U
|
||||
#define MENU_LABEL_PLAYLIST_DIRECTORY 0x6361820bU
|
||||
#define MENU_LABEL_CONTENT_DIRECTORY 0x7738dc14U
|
||||
#define MENU_LABEL_SCREENSHOT_DIRECTORY 0x552612d7U
|
||||
#define MENU_LABEL_VIDEO_SHADER_DIR 0x30f53b10U
|
||||
#define MENU_LABEL_VIDEO_FILTER_DIR 0x67603f1fU
|
||||
#define MENU_LABEL_AUDIO_FILTER_DIR 0x4bd96ebaU
|
||||
#define MENU_LABEL_SAVESTATE_DIRECTORY 0x90551289U
|
||||
#define MENU_LABEL_LIBRETRO_DIR_PATH 0x1af1eb72U
|
||||
#define MENU_LABEL_LIBRETRO_INFO_PATH 0xe552b25fU
|
||||
#define MENU_LABEL_RGUI_CONFIG_DIRECTORY 0x0cb3e005U
|
||||
#define MENU_LABEL_SAVEFILE_DIRECTORY 0x92773488U
|
||||
#define MENU_LABEL_OVERLAY_DIRECTORY 0xc4ed3d1bU
|
||||
#define MENU_LABEL_SYSTEM_DIRECTORY 0x35a6fb9eU
|
||||
#define MENU_LABEL_ASSETS_DIRECTORY 0xde1ae8ecU
|
||||
#define MENU_LABEL_EXTRACTION_DIRECTORY 0x33b55ffaU
|
||||
#define MENU_LABEL_JOYPAD_AUTOCONFIG_DIR 0x2f4822d8U
|
||||
#define MENU_LABEL_DRIVER_SETTINGS 0x81cd2d62U
|
||||
#define MENU_LABEL_CORE_SETTINGS 0x06795dffU
|
||||
#define MENU_LABEL_CONFIGURATION_SETTINGS 0x5a1558ceU
|
||||
#define MENU_LABEL_LOGGING_SETTINGS 0x902c003dU
|
||||
#define MENU_LABEL_SAVING_SETTINGS 0x32fea87eU
|
||||
#define MENU_LABEL_REWIND_SETTINGS 0xbff7775fU
|
||||
#define MENU_LABEL_VIDEO_SETTINGS 0x9dd23badU
|
||||
#define MENU_LABEL_RECORDING_SETTINGS 0x1a80b313U
|
||||
#define MENU_LABEL_FRAME_THROTTLE_SETTINGS 0x573b8837U
|
||||
#define MENU_LABEL_SHADER_SETTINGS 0xd6657e8dU
|
||||
#define MENU_LABEL_FONT_SETTINGS 0x1bc2266dU
|
||||
#define MENU_LABEL_AUDIO_SETTINGS 0x8f74c888U
|
||||
#define MENU_LABEL_INPUT_SETTINGS 0xddd30846U
|
||||
#define MENU_LABEL_OVERLAY_SETTINGS 0x34377f98U
|
||||
#define MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS 0xa6de9ba6U
|
||||
#define MENU_LABEL_MENU_SETTINGS 0x61e4544bU
|
||||
#define MENU_LABEL_UI_SETTINGS 0xf8da6ef4U
|
||||
#define MENU_LABEL_PATCH_SETTINGS 0xa78b0986U
|
||||
#define MENU_LABEL_PLAYLIST_SETTINGS 0x4d276288U
|
||||
#define MENU_LABEL_CORE_UPDATER_SETTINGS 0x124ad454U
|
||||
#define MENU_LABEL_NETWORK_SETTINGS 0x8b50d180U
|
||||
#define MENU_LABEL_ARCHIVE_SETTINGS 0x78e85398U
|
||||
#define MENU_LABEL_USER_SETTINGS 0xcdc9a8f5U
|
||||
#define MENU_LABEL_DIRECTORY_SETTINGS 0xb817bd2bU
|
||||
#define MENU_LABEL_PRIVACY_SETTINGS 0xce106254U
|
||||
#include <rhash.h>
|
||||
|
||||
static INLINE void replace_chars(char *str, char c1, char c2)
|
||||
{
|
||||
@ -173,431 +78,235 @@ static int action_get_title_default(const char *path, const char *label,
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
|
||||
if (!strcmp(label, "deferred_database_manager_list"))
|
||||
case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
|
||||
snprintf(s, len, "DATABASE SELECTION - %s", (elem0_path[0] != '\0') ? path_basename(elem0_path) : "");
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST - %s", (elem0_path[0] != '\0') ? path_basename(elem0_path) : "");
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_developer"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: DEVELOPER - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_publisher"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: PUBLISHER - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_origin"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: ORIGIN - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_franchise"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: FRANCHISE - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_edge_magazine_rating"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: EDGE MAGAZINE RATING - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_edge_magazine_issue"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: EDGE MAGAZINE ISSUE - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_releasemonth"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: RELEASEDATE BY MONTH - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_releaseyear"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: RELEASEDATE BY YEAR - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_esrb_rating"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: ESRB RATING - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_elspa_rating"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: ELSPA RATING - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_pegi_rating"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: PEGI RATING - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_cero_rating"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: CERO RATING - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_bbfc_rating"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: BBFC RATING - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS:
|
||||
if (!strcmp(label, "deferred_cursor_manager_list_rdb_entry_max_users"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS:
|
||||
snprintf(s, len, "DATABASE CURSOR LIST (FILTER: MAX USERS - %s)", elem0_path);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_RDB_ENTRY_DETAIL:
|
||||
if (!strcmp(label, "deferred_rdb_entry_detail"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_RDB_ENTRY_DETAIL:
|
||||
snprintf(s, len, "DATABASE INFO: %s", elem1);
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CORE_LIST:
|
||||
if (!strcmp(label, "deferred_core_list"))
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CORE_LIST:
|
||||
snprintf(s, len, "DETECTED CORES %s", path);
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATIONS:
|
||||
if (!strcmp(label, "configurations"))
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATIONS:
|
||||
snprintf(s, len, "CONFIG %s", path);
|
||||
break;
|
||||
case MENU_LABEL_DISK_IMAGE_APPEND:
|
||||
if (!strcmp(label, "disk_image_append"))
|
||||
break;
|
||||
case MENU_LABEL_DISK_IMAGE_APPEND:
|
||||
snprintf(s, len, "DISK APPEND %s", path);
|
||||
break;
|
||||
case MENU_LABEL_PERFORMANCE_COUNTERS:
|
||||
if (!strcmp(label, "performance_counters"))
|
||||
{
|
||||
is_performance_counters:
|
||||
break;
|
||||
case MENU_LABEL_PERFORMANCE_COUNTERS:
|
||||
case MENU_LABEL_CORE_LIST:
|
||||
case MENU_LABEL_MANAGEMENT:
|
||||
case MENU_LABEL_OPTIONS:
|
||||
case MENU_LABEL_SETTINGS:
|
||||
case MENU_LABEL_FRONTEND_COUNTERS:
|
||||
case MENU_LABEL_CORE_COUNTERS:
|
||||
case MENU_LABEL_HISTORY_LIST:
|
||||
case MENU_LABEL_INFO_SCREEN:
|
||||
case MENU_LABEL_SYSTEM_INFORMATION:
|
||||
case MENU_LABEL_CORE_INFORMATION:
|
||||
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
||||
case MENU_LABEL_DISK_OPTIONS:
|
||||
case MENU_LABEL_CORE_OPTIONS:
|
||||
case MENU_LABEL_SHADER_OPTIONS:
|
||||
case MENU_LABEL_VIDEO_OPTIONS:
|
||||
case MENU_LABEL_CORE_CHEAT_OPTIONS:
|
||||
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
||||
case MENU_LABEL_DATABASE_MANAGER_LIST:
|
||||
case MENU_LABEL_CURSOR_MANAGER_LIST:
|
||||
case MENU_LABEL_DEFERRED_CORE_UPDATER_LIST:
|
||||
sanitize_to_string(s, label, len);
|
||||
}
|
||||
break;
|
||||
case MENU_LABEL_CORE_LIST:
|
||||
if (!strcmp(label, "core_list"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_MANAGEMENT:
|
||||
if (!strcmp(label, "management"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_OPTIONS:
|
||||
if (!strcmp(label, "options"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_SETTINGS:
|
||||
if (!strcmp(label, "settings"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_FRONTEND_COUNTERS:
|
||||
if (!strcmp(label, "frontend_counters"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_CORE_COUNTERS:
|
||||
if (!strcmp(label, "core_counters"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_HISTORY_LIST:
|
||||
if (!strcmp(label, "history_list"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_INFO_SCREEN:
|
||||
if (!strcmp(label, "info_screen"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_SYSTEM_INFORMATION:
|
||||
if (!strcmp(label, "system_information"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_CORE_INFORMATION:
|
||||
if (!strcmp(label, "core_information"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
||||
if (!strcmp(label, "video_shader_parameters"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
||||
if (!strcmp(label, "video_shader_preset_parameters"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_DISK_OPTIONS:
|
||||
if (!strcmp(label, "disk_options"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_CORE_OPTIONS:
|
||||
if (!strcmp(label, "core_options"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_SHADER_OPTIONS:
|
||||
if (!strcmp(label, "shader_options"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_OPTIONS:
|
||||
if (!strcmp(label, "video_options"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_CORE_CHEAT_OPTIONS:
|
||||
if (!strcmp(label, "core_cheat_options"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
||||
if (!strcmp(label, "core_input_remapping_options"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_DATABASE_MANAGER_LIST:
|
||||
if (!strcmp(label, "database_manager_list"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_CURSOR_MANAGER_LIST:
|
||||
if (!strcmp(label, "cursor_manager_list"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_DEFERRED_CORE_UPDATER_LIST:
|
||||
if (!strcmp(label, "deferred_core_updater_list"))
|
||||
goto is_performance_counters;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
if (!strcmp(label, "video_shader_pass"))
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
snprintf(s, len, "SHADER %s", path);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET:
|
||||
if (!strcmp(label, "video_shader_preset"))
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET:
|
||||
snprintf(s, len, "SHADER PRESET %s", path);
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_LOAD:
|
||||
if (!strcmp(label, "cheat_file_load"))
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_LOAD:
|
||||
snprintf(s, len, "CHEAT FILE %s", path);
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_LOAD:
|
||||
if (!strcmp(label, "remap_file_load"))
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_LOAD:
|
||||
snprintf(s, len, "REMAP FILE %s", path);
|
||||
break;
|
||||
case MENU_LABEL_CUSTOM_VIEWPORT_2:
|
||||
if (!strcmp(label, "custom_viewport_2"))
|
||||
{
|
||||
is_custom_viewport_2:
|
||||
break;
|
||||
case MENU_LABEL_CUSTOM_VIEWPORT_2:
|
||||
case MENU_LABEL_HELP:
|
||||
snprintf(s, len, "MENU %s", path);
|
||||
}
|
||||
break;
|
||||
case MENU_LABEL_HELP:
|
||||
if (!strcmp(label, "help"))
|
||||
goto is_custom_viewport_2;
|
||||
break;
|
||||
case MENU_LABEL_INPUT_OVERLAY:
|
||||
if (!strcmp(label, "input_overlay"))
|
||||
break;
|
||||
case MENU_LABEL_INPUT_OVERLAY:
|
||||
snprintf(s, len, "OVERLAY %s", path);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FONT_PATH:
|
||||
if (!strcmp(label, "video_font_path"))
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FONT_PATH:
|
||||
snprintf(s, len, "FONT %s", path);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER:
|
||||
if (!strcmp(label, "video_filter"))
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER:
|
||||
snprintf(s, len, "FILTER %s", path);
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_DSP_PLUGIN:
|
||||
if (!strcmp(label, "audio_dsp_plugin"))
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_DSP_PLUGIN:
|
||||
snprintf(s, len, "DSP FILTER %s", path);
|
||||
break;
|
||||
case MENU_LABEL_RGUI_BROWSER_DIRECTORY:
|
||||
if (!strcmp(label, "rgui_browser_directory"))
|
||||
break;
|
||||
case MENU_LABEL_RGUI_BROWSER_DIRECTORY:
|
||||
snprintf(s, len, "BROWSER DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_PLAYLIST_DIRECTORY:
|
||||
if (!strcmp(label, "playlist_directory"))
|
||||
break;
|
||||
case MENU_LABEL_PLAYLIST_DIRECTORY:
|
||||
snprintf(s, len, "PLAYLIST DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_CONTENT_DIRECTORY:
|
||||
if (!strcmp(label, "content_directory"))
|
||||
break;
|
||||
case MENU_LABEL_CONTENT_DIRECTORY:
|
||||
snprintf(s, len, "CONTENT DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_SCREENSHOT_DIRECTORY:
|
||||
if (!strcmp(label, "screenshot_directory"))
|
||||
break;
|
||||
case MENU_LABEL_SCREENSHOT_DIRECTORY:
|
||||
snprintf(s, len, "SCREENSHOT DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_DIR:
|
||||
if (!strcmp(label, "video_shader_dir"))
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_DIR:
|
||||
snprintf(s, len, "SHADER DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER_DIR:
|
||||
if (!strcmp(label, "video_filter_dir"))
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_FILTER_DIR:
|
||||
snprintf(s, len, "FILTER DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_FILTER_DIR:
|
||||
if (!strcmp(label, "audio_filter_dir"))
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_FILTER_DIR:
|
||||
snprintf(s, len, "DSP FILTER DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_SAVESTATE_DIRECTORY:
|
||||
if (!strcmp(label, "savestate_directory"))
|
||||
break;
|
||||
case MENU_LABEL_SAVESTATE_DIRECTORY:
|
||||
snprintf(s, len, "SAVESTATE DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_LIBRETRO_DIR_PATH:
|
||||
if (!strcmp(label, "libretro_dir_path"))
|
||||
break;
|
||||
case MENU_LABEL_LIBRETRO_DIR_PATH:
|
||||
snprintf(s, len, "LIBRETRO DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_LIBRETRO_INFO_PATH:
|
||||
if (!strcmp(label, "libretro_info_path"))
|
||||
break;
|
||||
case MENU_LABEL_LIBRETRO_INFO_PATH:
|
||||
snprintf(s, len, "LIBRETRO INFO DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_RGUI_CONFIG_DIRECTORY:
|
||||
if (!strcmp(label, "rgui_config_directory"))
|
||||
break;
|
||||
case MENU_LABEL_RGUI_CONFIG_DIRECTORY:
|
||||
snprintf(s, len, "CONFIG DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_SAVEFILE_DIRECTORY:
|
||||
if (!strcmp(label, "savefile_directory"))
|
||||
break;
|
||||
case MENU_LABEL_SAVEFILE_DIRECTORY:
|
||||
snprintf(s, len, "SAVEFILE DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_OVERLAY_DIRECTORY:
|
||||
if (!strcmp(label, "overlay_directory"))
|
||||
break;
|
||||
case MENU_LABEL_OVERLAY_DIRECTORY:
|
||||
snprintf(s, len, "OVERLAY DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_SYSTEM_DIRECTORY:
|
||||
if (!strcmp(label, "system_directory"))
|
||||
break;
|
||||
case MENU_LABEL_SYSTEM_DIRECTORY:
|
||||
snprintf(s, len, "SYSTEM DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_ASSETS_DIRECTORY:
|
||||
if (!strcmp(label, "assets_directory"))
|
||||
break;
|
||||
case MENU_LABEL_ASSETS_DIRECTORY:
|
||||
snprintf(s, len, "ASSETS DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_EXTRACTION_DIRECTORY:
|
||||
if (!strcmp(label, "extraction_directory"))
|
||||
break;
|
||||
case MENU_LABEL_EXTRACTION_DIRECTORY:
|
||||
snprintf(s, len, "EXTRACTION DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_JOYPAD_AUTOCONFIG_DIR:
|
||||
if (!strcmp(label, "joypad_autoconfig_dir"))
|
||||
break;
|
||||
case MENU_LABEL_JOYPAD_AUTOCONFIG_DIR:
|
||||
snprintf(s, len, "AUTOCONFIG DIR %s", path);
|
||||
break;
|
||||
case MENU_LABEL_DRIVER_SETTINGS:
|
||||
if (!strcmp(label, "Driver Settings"))
|
||||
{
|
||||
is_settings_entry:
|
||||
break;
|
||||
case MENU_LABEL_DRIVER_SETTINGS:
|
||||
case MENU_LABEL_CORE_SETTINGS:
|
||||
case MENU_LABEL_CONFIGURATION_SETTINGS:
|
||||
case MENU_LABEL_LOGGING_SETTINGS:
|
||||
case MENU_LABEL_SAVING_SETTINGS:
|
||||
case MENU_LABEL_REWIND_SETTINGS:
|
||||
case MENU_LABEL_VIDEO_SETTINGS:
|
||||
case MENU_LABEL_RECORDING_SETTINGS:
|
||||
case MENU_LABEL_FRAME_THROTTLE_SETTINGS:
|
||||
case MENU_LABEL_SHADER_SETTINGS:
|
||||
case MENU_LABEL_FONT_SETTINGS:
|
||||
case MENU_LABEL_AUDIO_SETTINGS:
|
||||
case MENU_LABEL_INPUT_SETTINGS:
|
||||
case MENU_LABEL_INPUT_HOTKEY_SETTINGS:
|
||||
case MENU_LABEL_OVERLAY_SETTINGS:
|
||||
case MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS:
|
||||
case MENU_LABEL_MENU_SETTINGS:
|
||||
case MENU_LABEL_UI_SETTINGS:
|
||||
case MENU_LABEL_PATCH_SETTINGS:
|
||||
case MENU_LABEL_PLAYLIST_SETTINGS:
|
||||
case MENU_LABEL_CORE_UPDATER_SETTINGS:
|
||||
case MENU_LABEL_NETWORK_SETTINGS:
|
||||
case MENU_LABEL_ARCHIVE_SETTINGS:
|
||||
case MENU_LABEL_USER_SETTINGS:
|
||||
case MENU_LABEL_DIRECTORY_SETTINGS:
|
||||
case MENU_LABEL_PRIVACY_SETTINGS:
|
||||
strlcpy(s, string_to_upper(elem0), len);
|
||||
if (elem1[0] != '\0')
|
||||
{
|
||||
strlcat(s, " - ", len);
|
||||
strlcat(s, string_to_upper(elem1), len);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MENU_LABEL_CORE_SETTINGS:
|
||||
if (!strcmp(label, "Core Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_CONFIGURATION_SETTINGS:
|
||||
if (!strcmp(label, "Configuration Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_LOGGING_SETTINGS:
|
||||
if (!strcmp(label, "Logging Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_SAVING_SETTINGS:
|
||||
if (!strcmp(label, "Saving Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_REWIND_SETTINGS:
|
||||
if (!strcmp(label, "Rewind Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SETTINGS:
|
||||
if (!strcmp(label, "Video Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_RECORDING_SETTINGS:
|
||||
if (!strcmp(label, "Recording Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_FRAME_THROTTLE_SETTINGS:
|
||||
if (!strcmp(label, "Frame Throttle Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_SHADER_SETTINGS:
|
||||
if (!strcmp(label, "Shader Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_FONT_SETTINGS:
|
||||
if (!strcmp(label, "Font Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_AUDIO_SETTINGS:
|
||||
if (!strcmp(label, "Audio Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_INPUT_SETTINGS:
|
||||
if (!strcmp(label, "Input Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_OVERLAY_SETTINGS:
|
||||
if (!strcmp(label, "Overlay Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS:
|
||||
if (!strcmp(label, "Onscreen Keyboard Overlay Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_MENU_SETTINGS:
|
||||
if (!strcmp(label, "Menu Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_UI_SETTINGS:
|
||||
if (!strcmp(label, "UI Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_PATCH_SETTINGS:
|
||||
if (!strcmp(label, "Patch Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_PLAYLIST_SETTINGS:
|
||||
if (!strcmp(label, "Playlist Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_CORE_UPDATER_SETTINGS:
|
||||
if (!strcmp(label, "Core Updater Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_NETWORK_SETTINGS:
|
||||
if (!strcmp(label, "Network Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_ARCHIVE_SETTINGS:
|
||||
if (!strcmp(label, "Archive Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_USER_SETTINGS:
|
||||
if (!strcmp(label, "User Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_DIRECTORY_SETTINGS:
|
||||
if (!strcmp(label, "Directory Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
case MENU_LABEL_PRIVACY_SETTINGS:
|
||||
if (!strcmp(label, "Privacy Settings"))
|
||||
goto is_settings_entry;
|
||||
break;
|
||||
default:
|
||||
if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
||||
menu_type == MENU_SETTINGS)
|
||||
{
|
||||
goto is_custom_viewport_2;
|
||||
}
|
||||
else if (menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
||||
break;
|
||||
default:
|
||||
if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
||||
menu_type == MENU_SETTINGS)
|
||||
snprintf(s, len, "MENU %s", path);
|
||||
else if (menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
||||
menu_type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD)
|
||||
{
|
||||
strlcpy(s, "INPUT SETTINGS", len);
|
||||
if (elem1[0] != '\0')
|
||||
{
|
||||
strlcat(s, " - ", len);
|
||||
strlcat(s, string_to_upper(elem1), len);
|
||||
strlcpy(s, "INPUT SETTINGS", len);
|
||||
if (elem1[0] != '\0')
|
||||
{
|
||||
strlcat(s, " - ", len);
|
||||
strlcat(s, string_to_upper(elem1), len);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
if (driver->menu->defer_core)
|
||||
snprintf(s, len, "CONTENT %s", path);
|
||||
else
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
const char *core_name = global->menu.info.library_name;
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
if (!core_name)
|
||||
core_name = global->system.info.library_name;
|
||||
if (!core_name)
|
||||
core_name = "No Core";
|
||||
snprintf(s, len, "CONTENT (%s) %s", core_name, path);
|
||||
if (driver->menu->defer_core)
|
||||
snprintf(s, len, "CONTENT %s", path);
|
||||
else
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
const char *core_name = global->menu.info.library_name;
|
||||
|
||||
if (!core_name)
|
||||
core_name = global->system.info.library_name;
|
||||
if (!core_name)
|
||||
core_name = "No Core";
|
||||
snprintf(s, len, "CONTENT (%s) %s", core_name, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -605,7 +314,8 @@ static int action_get_title_default(const char *path, const char *label,
|
||||
|
||||
void menu_entries_cbs_init_bind_title(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
@ -36,7 +36,8 @@ static int action_bind_up_generic(unsigned type, const char *label)
|
||||
|
||||
void menu_entries_cbs_init_bind_up(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1)
|
||||
const char *elem0, const char *elem1,
|
||||
uint32_t label_hash, uint32_t menu_label_hash)
|
||||
{
|
||||
if (!cbs)
|
||||
return;
|
||||
|
@ -281,7 +281,7 @@ void menu_entry_pathdir_selected(uint32_t i)
|
||||
{
|
||||
rarch_setting_t *setting = menu_entry_get_setting(i);
|
||||
if (menu_setting_is_of_path_type(setting))
|
||||
setting->action_toggle( setting, MENU_ACTION_RIGHT, false);
|
||||
setting->action_right( setting, MENU_ACTION_RIGHT, false);
|
||||
}
|
||||
|
||||
bool menu_entry_pathdir_allow_empty(uint32_t i)
|
||||
|
337
menu/menu_hash.h
Normal file
337
menu/menu_hash.h
Normal file
@ -0,0 +1,337 @@
|
||||
/* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef MENU_HASH_H__
|
||||
#define MENU_HASH_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define MENU_LABEL_RESET 0x10474288U
|
||||
#define MENU_LABEL_SLOWMOTION 0x6a269ea0U
|
||||
#define MENU_LABEL_HOLD_FAST_FORWARD 0xebe2e4cdU
|
||||
#define MENU_LABEL_CHEAT_TOGGLE 0xe515e0cbU
|
||||
#define MENU_LABEL_PAUSE_TOGGLE 0x557634e4U
|
||||
#define MENU_LABEL_SAVE_STATE 0x54a257f4U
|
||||
#define MENU_LABEL_LOAD_STATE 0xe8c5dae5U
|
||||
#define MENU_LABEL_REWIND 0x1931d5aeU
|
||||
#define MENU_LABEL_NETPLAY_FLIP_PLAYERS 0x801425abU
|
||||
#define MENU_LABEL_CHEAT_INDEX_MINUS 0x57f58b6cU
|
||||
#define MENU_LABEL_CHEAT_INDEX_PLUS 0x678542a4U
|
||||
#define MENU_LABEL_SCREENSHOT_DIRECTORY 0x552612d7U
|
||||
#define MENU_LABEL_SHADER_NEXT 0x54d359baU
|
||||
#define MENU_LABEL_SHADER_PREV 0x54d4a758U
|
||||
#define MENU_LABEL_FRAME_ADVANCE 0xd80302a1U
|
||||
#define MENU_LABEL_MOVIE_RECORD_TOGGLE 0xa2d2ff04U
|
||||
#define MENU_LABEL_L_X_PLUS 0xd7370d4bU
|
||||
#define MENU_LABEL_L_X_MINUS 0xbde0aaf3U
|
||||
#define MENU_LABEL_L_Y_PLUS 0xd98c35ecU
|
||||
#define MENU_LABEL_L_Y_MINUS 0x0adae7b4U
|
||||
#define MENU_LABEL_R_X_PLUS 0x60c20a91U
|
||||
#define MENU_LABEL_R_X_MINUS 0x78cb50f9U
|
||||
#define MENU_LABEL_R_Y_MINUS 0xc5c58dbaU
|
||||
#define MENU_LABEL_R_Y_PLUS 0x63173332U
|
||||
#define MENU_LABEL_VIDEO_SWAP_INTERVAL 0x5673ff9aU
|
||||
#define MENU_LABEL_VIDEO_GPU_SCREENSHOT 0xee2fcb44U
|
||||
#define MENU_LABEL_PAUSE_NONACTIVE 0x580bf549U
|
||||
#define MENU_LABEL_BLOCK_SRAM_OVERWRITE 0xc4e88d08U
|
||||
#define MENU_LABEL_VIDEO_FULLSCREEN 0x9506dd4eU
|
||||
#define MENU_LABEL_CORE_SPECIFIC_CONFIG 0x3c9a55e8U
|
||||
#define MENU_LABEL_RGUI_SHOW_START_SCREEN 0x6b38f0e8U
|
||||
#define MENU_LABEL_VIDEO_BLACK_FRAME_INSERTION 0x53477f5cU
|
||||
#define MENU_LABEL_VIDEO_HARD_SYNC_FRAMES 0xce0ece13U
|
||||
#define MENU_LABEL_VIDEO_FRAME_DELAY 0xd4aa9df4U
|
||||
#define MENU_LABEL_SCREENSHOT 0x9a37f083U
|
||||
#define MENU_LABEL_REWIND_GRANULARITY 0xe859cbdfU
|
||||
#define MENU_LABEL_VIDEO_THREADED 0x0626179cU
|
||||
#define MENU_LABEL_VIDEO_VSYNC 0x09c2d34eU
|
||||
#define MENU_LABEL_VIDEO_HARD_SYNC 0xdcd623b6U
|
||||
#define MENU_LABEL_SAVESTATE_AUTO_SAVE 0xf6f4a05bU
|
||||
#define MENU_LABEL_SYSTEM_DIRECTORY 0x35a6fb9eU
|
||||
#define MENU_LABEL_VIDEO_DISABLE_COMPOSITION 0x5cbb6222U
|
||||
#define MENU_LABEL_VOLUME_UP 0xa66e9681U
|
||||
#define MENU_LABEL_VOLUME_DOWN 0xfc64f3d4U
|
||||
#define MENU_LABEL_LOG_VERBOSITY 0x6648c96dU
|
||||
#define MENU_LABEL_OVERLAY_NEXT 0x7a459145U
|
||||
#define MENU_LABEL_AUDIO_VOLUME 0x502173aeU
|
||||
#define MENU_LABEL_AUDIO_LATENCY 0x32695386U
|
||||
#define MENU_LABEL_NETPLAY_DELAY_FRAMES 0x86b2c48dU
|
||||
#define MENU_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE 0x6f9a9440U
|
||||
#define MENU_LABEL_NETPLAY_IP_ADDRESS 0xac9a53ffU
|
||||
#define MENU_LABEL_NETPLAY_MODE 0xc1cf6506U
|
||||
#define MENU_LABEL_PERFCNT_ENABLE 0x6823dbddU
|
||||
|
||||
#define MENU_LABEL_PAL60_ENABLE 0x62bc416eU
|
||||
#define MENU_LABEL_SYSTEM_BGM_ENABLE 0x9287a1c5U
|
||||
|
||||
#define MENU_LABEL_FASTFORWARD_RATIO 0x3a0c2706U
|
||||
#define MENU_LABEL_VIDEO_MONITOR_INDEX 0xb6fcdc9aU
|
||||
#define MENU_LABEL_VIDEO_REFRESH_RATE_AUTO 0x9addb6cdU
|
||||
#define MENU_LABEL_VIDEO_ROTATION 0x4ce6882bU
|
||||
#define MENU_LABEL_VIDEO_SCALE 0x09835d63U
|
||||
#define MENU_LABEL_VIDEO_SMOOTH 0x3aabbb35U
|
||||
#define MENU_LABEL_VIDEO_CROP_OVERSCAN 0x861f7a2fU
|
||||
#define MENU_LABEL_VIDEO_SCALE_INTEGER 0x65c4b090U
|
||||
|
||||
#define MENU_LABEL_AUDIO_RATE_CONTROL_DELTA 0xc8bde3cbU
|
||||
#define MENU_LABEL_AUDIO_MAX_TIMING_SKEW 0x4c96f75cU
|
||||
|
||||
#define MENU_LABEL_INPUT_PLAYER1_JOYPAD_INDEX 0xfad6ab2fU
|
||||
#define MENU_LABEL_INPUT_PLAYER2_JOYPAD_INDEX 0x3616e4d0U
|
||||
#define MENU_LABEL_INPUT_PLAYER3_JOYPAD_INDEX 0x71571e71U
|
||||
#define MENU_LABEL_INPUT_PLAYER4_JOYPAD_INDEX 0xac975812U
|
||||
#define MENU_LABEL_INPUT_PLAYER5_JOYPAD_INDEX 0xe7d791b3U
|
||||
|
||||
#define MENU_LABEL_LIBRETRO_DIR_PATH 0x1af1eb72U
|
||||
|
||||
#define MENU_LABEL_AUDIO_DEVICE 0x2574eac6U
|
||||
|
||||
#define MENU_LABEL_REWIND_ENABLE 0x9761e074U
|
||||
#define MENU_LABEL_ENABLE_HOTKEY 0xc04037bfU
|
||||
#define MENU_LABEL_DISK_EJECT_TOGGLE 0x49633fbbU
|
||||
#define MENU_LABEL_DISK_NEXT 0xeeaf6c6eU
|
||||
#define MENU_LABEL_GRAB_MOUSE_TOGGLE 0xb2869aaaU
|
||||
#define MENU_LABEL_MENU_TOGGLE 0xfb22e3dbU
|
||||
#define MENU_LABEL_STATE_SLOT_DECREASE 0xe48b8082U
|
||||
#define MENU_LABEL_STATE_SLOT_INCREASE 0x36a0cbb0U
|
||||
|
||||
#define MENU_LABEL_LIBRETRO_LOG_LEVEL 0x57971ac0U
|
||||
|
||||
#define MENU_LABEL_INPUT_BIND_DEVICE_ID 0xd1ea94ecU
|
||||
#define MENU_LABEL_INPUT_BIND_DEVICE_TYPE 0xf6e9f041U
|
||||
|
||||
#define MENU_LABEL_AUTOSAVE_INTERVAL 0xecc87351U
|
||||
#define MENU_LABEL_CONFIG_SAVE_ON_EXIT 0x79b590feU
|
||||
|
||||
#define MENU_LABEL_INPUT_DRIVER 0x4c087840U
|
||||
#define MENU_LABEL_INPUT_DRIVER_LINUXRAW 0xc33c6b9fU
|
||||
#define MENU_LABEL_INPUT_DRIVER_UDEV 0x7c9eeeb9U
|
||||
|
||||
#define MENU_LABEL_VIDEO_DRIVER 0x1805a5e7U
|
||||
#define MENU_LABEL_VIDEO_DRIVER_GL 0x005977f8U
|
||||
#define MENU_LABEL_VIDEO_DRIVER_SDL2 0x7c9dd69aU
|
||||
#define MENU_LABEL_VIDEO_DRIVER_SDL1 0x0b88a968U
|
||||
#define MENU_LABEL_VIDEO_DRIVER_D3D 0x0b886340U
|
||||
#define MENU_LABEL_VIDEO_DRIVER_EXYNOS 0xfc37c54bU
|
||||
#define MENU_LABEL_VIDEO_DRIVER_SUNXI 0x10620e3cU
|
||||
|
||||
#define MENU_LABEL_AUDIO_RESAMPLER_DRIVER 0xedcba9ecU
|
||||
#define MENU_LABEL_AUDIO_RESAMPLER_DRIVER_SINC 0x7c9dec52U
|
||||
#define MENU_LABEL_AUDIO_RESAMPLER_DRIVER_CC 0x0059732bU
|
||||
|
||||
#define MENU_LABEL_SAVEFILE_DIRECTORY 0x92773488U
|
||||
#define MENU_LABEL_SAVESTATE_DIRECTORY 0x90551289U
|
||||
#define MENU_LABEL_ASSETS_DIRECTORY 0xde1ae8ecU
|
||||
#define MENU_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY 0x62f975b8U
|
||||
|
||||
#define MENU_LABEL_SLOWMOTION_RATIO 0x626b3ffeU
|
||||
#define MENU_LABEL_INPUT_AXIS_THRESHOLD 0xe95c2095U
|
||||
#define MENU_LABEL_INPUT_TURBO_PERIOD 0xf7a97482U
|
||||
#define MENU_LABEL_INPUT_AUTODETECT_ENABLE 0xb1e07facU
|
||||
|
||||
#define MENU_LABEL_CAMERA_ALLOW 0xc14d302cU
|
||||
#define MENU_LABEL_LOCATION_ALLOW 0xf089275cU
|
||||
|
||||
#define MENU_LABEL_TURBO 0x107434f1U
|
||||
|
||||
|
||||
|
||||
|
||||
#define MENU_LABEL_RDB_ENTRY_PUBLISHER 0x4d7bcdfbU
|
||||
#define MENU_LABEL_RDB_ENTRY_DEVELOPER 0x06f61093U
|
||||
#define MENU_LABEL_RDB_ENTRY_ORIGIN 0xb176aad5U
|
||||
#define MENU_LABEL_RDB_ENTRY_FRANCHISE 0xb31764a0U
|
||||
#define MENU_LABEL_RDB_ENTRY_ENHANCEMENT_HW 0x79ee4f11U
|
||||
#define MENU_LABEL_RDB_ENTRY_ESRB_RATING 0xe138fa3dU
|
||||
#define MENU_LABEL_RDB_ENTRY_BBFC_RATING 0x82dbc01eU
|
||||
#define MENU_LABEL_RDB_ENTRY_ELSPA_RATING 0x0def0906U
|
||||
#define MENU_LABEL_RDB_ENTRY_PEGI_RATING 0xd814cb56U
|
||||
#define MENU_LABEL_RDB_ENTRY_CERO_RATING 0x9d436f5aU
|
||||
#define MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_RATING 0x9735f631U
|
||||
#define MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_ISSUE 0xd5706415U
|
||||
#define MENU_LABEL_RDB_ENTRY_FAMITSU_MAGAZINE_RATING 0x01a50315U
|
||||
#define MENU_LABEL_RDB_ENTRY_RELEASE_MONTH 0xad2f2c54U
|
||||
#define MENU_LABEL_RDB_ENTRY_RELEASE_YEAR 0x14c9c6bfU
|
||||
#define MENU_LABEL_RDB_ENTRY_MAX_USERS 0xfae91cc4U
|
||||
|
||||
#define MENU_LABEL_VIDEO_SHADER_DEFAULT_FILTER 0x4468cb1bU
|
||||
#define MENU_LABEL_VIDEO_SHADER_FILTER_PASS 0x1906c38dU
|
||||
#define MENU_LABEL_VIDEO_SHADER_SCALE_PASS 0x18f7b82fU
|
||||
#define MENU_LABEL_VIDEO_SHADER_NUM_PASSES 0x79b2992fU
|
||||
#define MENU_LABEL_CHEAT_NUM_PASSES 0x1910eb87U
|
||||
|
||||
#define MENU_VALUE_MD5 0x0b888fabU
|
||||
#define MENU_VALUE_SHA1 0x7c9de632U
|
||||
#define MENU_VALUE_CRC 0x0b88671dU
|
||||
#define MENU_VALUE_MORE 0x0b877cafU
|
||||
#define MENU_VALUE_INPUT_SETTINGS 0xddd30846U
|
||||
#define MENU_VALUE_HORIZONTAL_MENU 0x35761704U
|
||||
#define MENU_VALUE_MAIN_MENU 0x1625971fU
|
||||
#define MENU_VALUE_ON 0x005974c2U
|
||||
#define MENU_VALUE_OFF 0x0b880c40U
|
||||
#define MENU_VALUE_TRUE 0x7c9e9fe5U
|
||||
#define MENU_VALUE_FALSE 0x0f6bcef0U
|
||||
#define MENU_VALUE_COMP 0x6a166ba5U
|
||||
#define MENU_VALUE_CORE 0x6a167f7fU
|
||||
#define MENU_VALUE_CURSOR 0x57bba8b4U
|
||||
#define MENU_VALUE_FILE 0x6a496536U
|
||||
#define MENU_VALUE_RDB 0x0b00f54eU
|
||||
#define MENU_VALUE_DIR 0x0af95f55U
|
||||
|
||||
#define MENU_LABEL_CONTENT_ACTIONS 0xa0d76970U
|
||||
#define MENU_LABEL_DETECT_CORE_LIST 0xaa07c341U
|
||||
#define MENU_LABEL_LOAD_CONTENT 0x5745de1fU
|
||||
#define MENU_LABEL_CORE_UPDATER_LIST 0x0372767dU
|
||||
#define MENU_LABEL_RECORD_CONFIG 0x11c3daf9U
|
||||
#define MENU_LABEL_UNLOAD_CORE 0x4b622170U
|
||||
#define MENU_LABEL_QUIT_RETROARCH 0x84b0bc71U
|
||||
#define MENU_LABEL_DEFERRED_VIDEO_FILTER 0x966ad201U
|
||||
#define MENU_LABEL_DEFERRED_CORE_LIST_SET 0xa6d5fdb4U
|
||||
#define MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST 0x7c0b704fU
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST 0x45446638U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER 0xcbd89be5U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER 0x125e594dU
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN 0x4ebaa767U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE 0x77f9eff2U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING 0x1c7f8a43U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE 0xaaeebde7U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING 0xbf7ff5e7U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW 0x9866bda3U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH 0x2b36ce66U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR 0x9c7c6e91U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING 0x68eba20fU
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING 0x8bf6ab18U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING 0x5fc77328U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING 0x24f6172cU
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING 0x0a8e67f0U
|
||||
#define MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS 0xbfcba816U
|
||||
#define MENU_LABEL_DEFERRED_RDB_ENTRY_DETAIL 0xc35416c0U
|
||||
#define MENU_LABEL_DEFERRED_CORE_LIST 0xf157d289U
|
||||
#define MENU_LABEL_DEFERRED_CORE_UPDATER_LIST 0xbd4d493dU
|
||||
#define MENU_LABEL_CONFIGURATIONS 0x3e930a50U
|
||||
#define MENU_LABEL_DISK_IMAGE_APPEND 0x5af7d709U
|
||||
#define MENU_LABEL_PERFORMANCE_COUNTERS 0xd8ab5049U
|
||||
#define MENU_LABEL_CORE_LIST 0xa8c3bfc9U
|
||||
#define MENU_LABEL_MANAGEMENT 0xb8137ec2U
|
||||
#define MENU_LABEL_OPTIONS 0x71f05091U
|
||||
#define MENU_LABEL_SETTINGS 0x1304dc16U
|
||||
#define MENU_LABEL_FRONTEND_COUNTERS 0xe5696877U
|
||||
#define MENU_LABEL_CORE_COUNTERS 0x64cc83e0U
|
||||
#define MENU_LABEL_HISTORY_LIST 0x60d82032U
|
||||
#define MENU_LABEL_INFO_SCREEN 0xd97853d0U
|
||||
#define MENU_LABEL_SYSTEM_INFORMATION 0x206ebf0fU
|
||||
#define MENU_LABEL_CORE_INFORMATION 0xb638e0d3U
|
||||
#define MENU_LABEL_VIDEO_SHADER_PARAMETERS 0x9895c3e5U
|
||||
#define MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS 0xd18158d7U
|
||||
#define MENU_LABEL_DISK_OPTIONS 0xc61ab5fbU
|
||||
#define MENU_LABEL_CORE_OPTIONS 0xf65e60f9U
|
||||
#define MENU_LABEL_SHADER_OPTIONS 0x1f7d2fc7U
|
||||
#define MENU_LABEL_VIDEO_OPTIONS 0x6390c4e7U
|
||||
#define MENU_LABEL_CORE_CHEAT_OPTIONS 0x9293171dU
|
||||
#define MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS 0x7836a8caU
|
||||
#define MENU_LABEL_DATABASE_MANAGER_LIST 0x7f853d8fU
|
||||
#define MENU_LABEL_CURSOR_MANAGER_LIST 0xa969e378U
|
||||
#define MENU_LABEL_VIDEO_SHADER_PASS 0x4fa31028U
|
||||
#define MENU_LABEL_VIDEO_SHADER_PRESET 0xc5d3bae4U
|
||||
#define MENU_LABEL_CHEAT_FILE_LOAD 0x57336148U
|
||||
#define MENU_LABEL_REMAP_FILE_LOAD 0x9c2799b8U
|
||||
#define MENU_LABEL_MESSAGE 0xbe463eeaU
|
||||
#define MENU_LABEL_INFO_SCREEN 0xd97853d0U
|
||||
#define MENU_LABEL_LOAD_OPEN_ZIP 0x8aa3c068U
|
||||
#define MENU_LABEL_CUSTOM_VIEWPORT_1 0x76c3016fU
|
||||
#define MENU_LABEL_CUSTOM_VIEWPORT_2 0x76c30170U
|
||||
#define MENU_LABEL_HELP 0x7c97d2eeU
|
||||
#define MENU_LABEL_INPUT_OVERLAY 0x24e24796U
|
||||
#define MENU_LABEL_INPUT_OSK_OVERLAY 0x11f1c582U
|
||||
#define MENU_LABEL_VIDEO_FONT_PATH 0xd0de729eU
|
||||
#define MENU_LABEL_VIDEO_FILTER 0x1c0eb741U
|
||||
#define MENU_LABEL_MENU_WALLPAPER 0x3b84de01U
|
||||
#define MENU_LABEL_CONTENT_HISTORY_PATH 0x6f22fb9dU
|
||||
#define MENU_LABEL_AUDIO_DSP_PLUGIN 0x4a69572bU
|
||||
#define MENU_LABEL_RGUI_BROWSER_DIRECTORY 0xa86cba73U
|
||||
#define MENU_LABEL_PLAYLIST_DIRECTORY 0x6361820bU
|
||||
#define MENU_LABEL_CONTENT_DIRECTORY 0x7738dc14U
|
||||
#define MENU_LABEL_SCREENSHOT_DIRECTORY 0x552612d7U
|
||||
#define MENU_LABEL_VIDEO_SHADER_DIR 0x30f53b10U
|
||||
#define MENU_LABEL_VIDEO_FILTER_DIR 0x67603f1fU
|
||||
#define MENU_LABEL_AUDIO_FILTER_DIR 0x4bd96ebaU
|
||||
#define MENU_LABEL_SAVESTATE_DIRECTORY 0x90551289U
|
||||
#define MENU_LABEL_LIBRETRO_DIR_PATH 0x1af1eb72U
|
||||
#define MENU_LABEL_LIBRETRO_INFO_PATH 0xe552b25fU
|
||||
#define MENU_LABEL_RGUI_CONFIG_DIRECTORY 0x0cb3e005U
|
||||
#define MENU_LABEL_SAVEFILE_DIRECTORY 0x92773488U
|
||||
#define MENU_LABEL_OVERLAY_DIRECTORY 0xc4ed3d1bU
|
||||
#define MENU_LABEL_SYSTEM_DIRECTORY 0x35a6fb9eU
|
||||
#define MENU_LABEL_ASSETS_DIRECTORY 0xde1ae8ecU
|
||||
#define MENU_LABEL_EXTRACTION_DIRECTORY 0x33b55ffaU
|
||||
#define MENU_LABEL_JOYPAD_AUTOCONFIG_DIR 0x2f4822d8U
|
||||
#define MENU_LABEL_DRIVER_SETTINGS 0x81cd2d62U
|
||||
#define MENU_LABEL_CORE_SETTINGS 0x06795dffU
|
||||
#define MENU_LABEL_CONFIGURATION_SETTINGS 0x5a1558ceU
|
||||
#define MENU_LABEL_LOGGING_SETTINGS 0x902c003dU
|
||||
#define MENU_LABEL_SAVING_SETTINGS 0x32fea87eU
|
||||
#define MENU_LABEL_REWIND_SETTINGS 0xbff7775fU
|
||||
#define MENU_LABEL_VIDEO_SETTINGS 0x9dd23badU
|
||||
#define MENU_LABEL_RECORDING_SETTINGS 0x1a80b313U
|
||||
#define MENU_LABEL_FRAME_THROTTLE_SETTINGS 0x573b8837U
|
||||
#define MENU_LABEL_SHADER_SETTINGS 0xd6657e8dU
|
||||
#define MENU_LABEL_FONT_SETTINGS 0x67571029U
|
||||
#define MENU_LABEL_AUDIO_SETTINGS 0x8f74c888U
|
||||
#define MENU_LABEL_INPUT_SETTINGS 0xddd30846U
|
||||
#define MENU_LABEL_INPUT_HOTKEY_SETTINGS 0xa4fee31aU
|
||||
#define MENU_LABEL_OVERLAY_SETTINGS 0x34377f98U
|
||||
#define MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS 0xa6de9ba6U
|
||||
#define MENU_LABEL_MENU_SETTINGS 0x61e4544bU
|
||||
#define MENU_LABEL_UI_SETTINGS 0xf8da6ef4U
|
||||
#define MENU_LABEL_PATCH_SETTINGS 0xa78b0986U
|
||||
#define MENU_LABEL_PLAYLIST_SETTINGS 0x4d276288U
|
||||
#define MENU_LABEL_CORE_UPDATER_SETTINGS 0x124ad454U
|
||||
#define MENU_LABEL_NETWORK_SETTINGS 0x8b50d180U
|
||||
#define MENU_LABEL_ARCHIVE_SETTINGS 0x78e85398U
|
||||
#define MENU_LABEL_USER_SETTINGS 0xcdc9a8f5U
|
||||
#define MENU_LABEL_DIRECTORY_SETTINGS 0xb817bd2bU
|
||||
#define MENU_LABEL_PRIVACY_SETTINGS 0xce106254U
|
||||
#define MENU_LABEL_SHADER_APPLY_CHANGES 0x4f7306b9U
|
||||
#define MENU_LABEL_SAVE_NEW_CONFIG 0xcce9ab72U
|
||||
#define MENU_LABEL_ONSCREEN_DISPLAY_SETTINGS 0x67571029U
|
||||
#define MENU_LABEL_CHEAT_APPLY_CHANGES 0xde88aa27U
|
||||
#define MENU_LABEL_CUSTOM_BIND 0x1e84b3fcU
|
||||
#define MENU_LABEL_CUSTOM_BIND_ALL 0x79ac14f4U
|
||||
#define MENU_LABEL_CUSTOM_BIND_DEFAULTS 0xe88f7b13U
|
||||
#define MENU_LABEL_SAVESTATE 0x3a4849b5U
|
||||
#define MENU_LABEL_LOADSTATE 0xa39eb286U
|
||||
#define MENU_LABEL_RESUME_CONTENT 0xd9f088b0U
|
||||
#define MENU_LABEL_RESTART_CONTENT 0x1ea2e224U
|
||||
#define MENU_LABEL_TAKE_SCREENSHOT 0x6786e867U
|
||||
#define MENU_LABEL_FILE_LOAD_OR_RESUME 0x952941f4U
|
||||
#define MENU_LABEL_DISK_IMAGE_APPEND 0x5af7d709U
|
||||
#define MENU_LABEL_CONFIGURATIONS 0x3e930a50U
|
||||
#define MENU_LABEL_CHEAT_FILE_SAVE_AS 0x1f58dccaU
|
||||
#define MENU_LABEL_REMAP_FILE_SAVE_AS 0xcebf7f3aU
|
||||
#define MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS 0x3d6e5ce5U
|
||||
#define MENU_LABEL_REMAP_FILE_SAVE_CORE 0x7c9d4c8fU
|
||||
#define MENU_LABEL_REMAP_FILE_SAVE_GAME 0x7c9f41e0U
|
||||
#define MENU_LABEL_CONTENT_COLLECTION_LIST 0x0f8a9086U
|
||||
#define MENU_LABEL_OSK_ENABLE 0x8e208498U
|
||||
#define MENU_LABEL_AUDIO_MUTE 0xe0ca1151U
|
||||
#define MENU_LABEL_EXIT_EMULATOR 0x86d5d467U
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -22,6 +22,9 @@
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <rhash.h>
|
||||
|
||||
#include "menu_input.h"
|
||||
#include "menu.h"
|
||||
#include "menu_entry.h"
|
||||
@ -135,12 +138,20 @@ void menu_input_st_string_callback(void *userdata, const char *str)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!strcmp(menu->keyboard.label_setting, "video_shader_preset_save_as"))
|
||||
menu_shader_manager_save_preset(str, false);
|
||||
else if (!strcmp(menu->keyboard.label_setting, "remap_file_save_as"))
|
||||
input_remapping_save_file(str);
|
||||
else if (!strcmp(menu->keyboard.label_setting, "cheat_file_save_as"))
|
||||
cheat_manager_save(global->cheat, str);
|
||||
uint32_t hash_label = djb2_calculate(menu->keyboard.label_setting);
|
||||
|
||||
switch (hash_label)
|
||||
{
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS:
|
||||
menu_shader_manager_save_preset(str, false);
|
||||
break;
|
||||
case MENU_LABEL_REMAP_FILE_SAVE_AS:
|
||||
input_remapping_save_file(str);
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_SAVE_AS:
|
||||
cheat_manager_save(global->cheat, str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
2607
menu/menu_setting.c
2607
menu/menu_setting.c
File diff suppressed because it is too large
Load Diff
@ -103,8 +103,10 @@ enum setting_list_flags
|
||||
#define SL_FLAG_ALL_SETTINGS (SL_FLAG_ALL - SL_FLAG_MAIN_MENU)
|
||||
|
||||
typedef void (*change_handler_t )(void *data);
|
||||
typedef int (*action_toggle_handler_t )(void *data, unsigned action, bool wraparound);
|
||||
typedef int (*action_up_or_down_handler_t )(void *data, unsigned action);
|
||||
typedef int (*action_left_handler_t )(void *data, unsigned action, bool wraparound);
|
||||
typedef int (*action_right_handler_t )(void *data, unsigned action, bool wraparound);
|
||||
typedef int (*action_up_handler_t )(void *data, unsigned action);
|
||||
typedef int (*action_down_handler_t )(void *data, unsigned action);
|
||||
typedef int (*action_start_handler_t )(void *data);
|
||||
typedef int (*action_iterate_handler_t )(unsigned action);
|
||||
typedef int (*action_cancel_handler_t )(void *data, unsigned action);
|
||||
@ -147,8 +149,10 @@ typedef struct rarch_setting
|
||||
change_handler_t read_handler;
|
||||
action_start_handler_t action_start;
|
||||
action_iterate_handler_t action_iterate;
|
||||
action_toggle_handler_t action_toggle;
|
||||
action_up_or_down_handler_t action_up_or_down;
|
||||
action_left_handler_t action_left;
|
||||
action_right_handler_t action_right;
|
||||
action_up_handler_t action_up;
|
||||
action_down_handler_t action_down;
|
||||
action_cancel_handler_t action_cancel;
|
||||
action_ok_handler_t action_ok;
|
||||
get_string_representation_t get_string_representation;
|
||||
|
Loading…
x
Reference in New Issue
Block a user