mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +00:00
Start adding hooks for showing descriptions for Cheevos
This commit is contained in:
parent
9161d0f0cc
commit
980c743938
@ -804,10 +804,26 @@ static int action_ok_shader_pass_load(const char *path,
|
|||||||
ACTION_OK_LOAD_SHADER_PASS, MENU_LABEL_SHADER_OPTIONS);
|
ACTION_OK_LOAD_SHADER_PASS, MENU_LABEL_SHADER_OPTIONS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int generic_action_ok_help(const char *path,
|
||||||
|
const char *label, unsigned type, size_t idx, size_t entry_idx,
|
||||||
|
unsigned id, menu_help_type_t id2)
|
||||||
|
{
|
||||||
|
const char *lbl = menu_hash_to_str(id);
|
||||||
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
menu->help_screen_type = id2;
|
||||||
|
return generic_action_ok_displaylist_push(path, lbl, type, idx,
|
||||||
|
entry_idx, ACTION_OK_DL_HELP);
|
||||||
|
}
|
||||||
|
|
||||||
static int action_ok_cheevos(const char *path,
|
static int action_ok_cheevos(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return 0;
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
unsigned new_id = type - MENU_SETTINGS_CHEEVOS_START;
|
||||||
|
|
||||||
|
menu->help_screen_id = new_id;
|
||||||
|
return generic_action_ok_help(path, label, type, idx, entry_idx,
|
||||||
|
MENU_LABEL_CHEEVOS_DESCRIPTION, MENU_HELP_CHEEVOS_DESCRIPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int action_ok_cheat(const char *path,
|
static int action_ok_cheat(const char *path,
|
||||||
@ -1599,16 +1615,6 @@ static int action_ok_rpl_entry(const char *path,
|
|||||||
entry_idx, ACTION_OK_DL_RPL_ENTRY);
|
entry_idx, ACTION_OK_DL_RPL_ENTRY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int generic_action_ok_help(const char *path,
|
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx,
|
|
||||||
unsigned id, menu_help_type_t id2)
|
|
||||||
{
|
|
||||||
const char *lbl = menu_hash_to_str(id);
|
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
|
||||||
menu->help_screen_type = id2;
|
|
||||||
return generic_action_ok_displaylist_push(path, lbl, type, idx,
|
|
||||||
entry_idx, ACTION_OK_DL_HELP);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int action_ok_open_archive_detect_core(const char *path,
|
static int action_ok_open_archive_detect_core(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <compat/strl.h>
|
#include <compat/strl.h>
|
||||||
|
#include <retro_log.h>
|
||||||
|
|
||||||
#include "menu_generic.h"
|
#include "menu_generic.h"
|
||||||
|
|
||||||
@ -135,6 +136,11 @@ static int action_iterate_help(char *s, size_t len, const char *label)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case MENU_HELP_CHEEVOS_DESCRIPTION:
|
||||||
|
RARCH_LOG("id is: %d\n", menu->help_screen_id);
|
||||||
|
menu_hash_get_help(MENU_LABEL_VALUE_WHAT_IS_A_CORE_DESC,
|
||||||
|
s, len);
|
||||||
|
break;
|
||||||
case MENU_HELP_WHAT_IS_A_CORE:
|
case MENU_HELP_WHAT_IS_A_CORE:
|
||||||
menu_hash_get_help(MENU_LABEL_VALUE_WHAT_IS_A_CORE_DESC,
|
menu_hash_get_help(MENU_LABEL_VALUE_WHAT_IS_A_CORE_DESC,
|
||||||
s, len);
|
s, len);
|
||||||
@ -177,6 +183,7 @@ static enum action_iterate_type action_iterate_type(uint32_t hash)
|
|||||||
case MENU_LABEL_HELP_WHAT_IS_A_CORE:
|
case MENU_LABEL_HELP_WHAT_IS_A_CORE:
|
||||||
case MENU_LABEL_HELP_LOADING_CONTENT:
|
case MENU_LABEL_HELP_LOADING_CONTENT:
|
||||||
case MENU_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD:
|
case MENU_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD:
|
||||||
|
case MENU_LABEL_CHEEVOS_DESCRIPTION:
|
||||||
case MENU_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING:
|
case MENU_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING:
|
||||||
case MENU_LABEL_HELP_SCANNING_CONTENT:
|
case MENU_LABEL_HELP_SCANNING_CONTENT:
|
||||||
return ITERATE_TYPE_HELP;
|
return ITERATE_TYPE_HELP;
|
||||||
|
@ -68,6 +68,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
|||||||
return "debug_panel_enable";
|
return "debug_panel_enable";
|
||||||
case MENU_LABEL_HELP_SCANNING_CONTENT:
|
case MENU_LABEL_HELP_SCANNING_CONTENT:
|
||||||
return "help_scanning_content";
|
return "help_scanning_content";
|
||||||
|
case MENU_LABEL_CHEEVOS_DESCRIPTION:
|
||||||
|
return "cheevos_description";
|
||||||
case MENU_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING:
|
case MENU_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING:
|
||||||
return "help_audio_video_troubleshooting";
|
return "help_audio_video_troubleshooting";
|
||||||
case MENU_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD:
|
case MENU_LABEL_HELP_CHANGE_VIRTUAL_GAMEPAD:
|
||||||
@ -704,6 +706,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
|||||||
return "Debug Panel Enable";
|
return "Debug Panel Enable";
|
||||||
case MENU_LABEL_VALUE_HELP_SCANNING_CONTENT:
|
case MENU_LABEL_VALUE_HELP_SCANNING_CONTENT:
|
||||||
return "Scanning For Content";
|
return "Scanning For Content";
|
||||||
|
case MENU_LABEL_VALUE_CHEEVOS_DESCRIPTION:
|
||||||
|
return "Description";
|
||||||
case MENU_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING:
|
case MENU_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING:
|
||||||
return "Audio/Video Troubleshooting";
|
return "Audio/Video Troubleshooting";
|
||||||
case MENU_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD:
|
case MENU_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD:
|
||||||
|
@ -53,6 +53,7 @@ typedef enum
|
|||||||
MENU_HELP_WELCOME,
|
MENU_HELP_WELCOME,
|
||||||
MENU_HELP_EXTRACT,
|
MENU_HELP_EXTRACT,
|
||||||
MENU_HELP_CONTROLS,
|
MENU_HELP_CONTROLS,
|
||||||
|
MENU_HELP_CHEEVOS_DESCRIPTION,
|
||||||
MENU_HELP_LOADING_CONTENT,
|
MENU_HELP_LOADING_CONTENT,
|
||||||
MENU_HELP_WHAT_IS_A_CORE,
|
MENU_HELP_WHAT_IS_A_CORE,
|
||||||
MENU_HELP_CHANGE_VIRTUAL_GAMEPAD,
|
MENU_HELP_CHANGE_VIRTUAL_GAMEPAD,
|
||||||
@ -68,6 +69,7 @@ typedef struct
|
|||||||
float scroll_y;
|
float scroll_y;
|
||||||
|
|
||||||
bool push_help_screen;
|
bool push_help_screen;
|
||||||
|
unsigned help_screen_id;
|
||||||
menu_help_type_t help_screen_type;
|
menu_help_type_t help_screen_type;
|
||||||
|
|
||||||
bool defer_core;
|
bool defer_core;
|
||||||
|
@ -22,6 +22,10 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MENU_LABEL_CHEEVOS_DESCRIPTION 0x7e00e0f5U
|
||||||
|
|
||||||
|
#define MENU_LABEL_VALUE_CHEEVOS_DESCRIPTION 0xab3975d6U
|
||||||
|
|
||||||
#define MENU_LABEL_VALUE_STATE_SLOT 0xa1dec768U
|
#define MENU_LABEL_VALUE_STATE_SLOT 0xa1dec768U
|
||||||
|
|
||||||
#define MENU_LABEL_STATE_SLOT 0x27b67f67U
|
#define MENU_LABEL_STATE_SLOT 0x27b67f67U
|
||||||
|
Loading…
x
Reference in New Issue
Block a user