mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
do not use old cheevos implementation
This commit is contained in:
parent
95546b51d7
commit
694bac565f
@ -1723,11 +1723,8 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
DEFINES += -DHAVE_CHEEVOS \
|
||||
-Ideps/rcheevos/include
|
||||
|
||||
OBJ += cheevos/cheevos.o \
|
||||
cheevos/badges.o \
|
||||
cheevos/var.o \
|
||||
cheevos/cond.o \
|
||||
cheevos-new/cheevos.o \
|
||||
OBJ += cheevos-new/cheevos.o \
|
||||
cheevos-new/badges.o \
|
||||
cheevos-new/fixup.o \
|
||||
cheevos-new/parser.o \
|
||||
cheevos-new/hash.o \
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include <rthreads/rthreads.h>
|
||||
#endif
|
||||
|
||||
#include "../cheevos/badges.h" /* RCHEEVOS TODO: fix path */
|
||||
#include "badges.h"
|
||||
#include "cheevos.h"
|
||||
#include "fixup.h"
|
||||
#include "parser.h"
|
||||
|
89
command.c
89
command.c
@ -40,9 +40,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "cheevos/cheevos.h"
|
||||
#include "cheevos/var.h"
|
||||
#include "cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove lines */
|
||||
#include "cheevos-new/cheevos.h"
|
||||
#include "cheevos-new/fixup.h"
|
||||
#endif
|
||||
|
||||
@ -290,10 +288,6 @@ bool command_set_shader(const char *arg)
|
||||
#define SMY_CMD_STR "READ_CORE_RAM"
|
||||
static bool command_read_ram(const char *arg)
|
||||
{
|
||||
/* RCHEEVOS TODO: remove settings init and test */
|
||||
settings_t *settings = config_get_ptr();
|
||||
cheevos_var_t var;
|
||||
|
||||
unsigned i;
|
||||
char *reply = NULL;
|
||||
const uint8_t *data = NULL;
|
||||
@ -309,16 +303,7 @@ static bool command_read_ram(const char *arg)
|
||||
reply[0] = '\0';
|
||||
reply_at = reply + snprintf(reply, alloc_size - 1, SMY_CMD_STR " %x", addr);
|
||||
|
||||
/* RCHEEVOS TODO: remove if condition below */
|
||||
if (!settings->bools.cheevos_old_enable)
|
||||
data = rcheevos_patch_address(addr, rcheevos_get_console());
|
||||
/* RCHEEVOS TODO: remove whole else block below */
|
||||
else
|
||||
{
|
||||
var.value = addr;
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
data = cheevos_var_get_memory(&var);
|
||||
}
|
||||
data = rcheevos_patch_address(addr, rcheevos_get_console());
|
||||
|
||||
if (data)
|
||||
{
|
||||
@ -343,24 +328,8 @@ static bool command_write_ram(const char *arg)
|
||||
uint8_t *data = NULL;
|
||||
unsigned int addr = 0;
|
||||
|
||||
/* RCHEEVOS TODO: remove settings init and test */
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings->bools.cheevos_old_enable)
|
||||
{
|
||||
addr = strtoul(arg, (char**)&arg, 16);
|
||||
data = (uint8_t *)rcheevos_patch_address(addr, rcheevos_get_console());
|
||||
}
|
||||
/* RCHEEVOS TODO: remove the whole else block below */
|
||||
else
|
||||
{
|
||||
cheevos_var_t var;
|
||||
|
||||
var.value = strtoul(arg, (char**)&arg, 16);
|
||||
cheevos_var_patch_addr(&var, cheevos_get_console());
|
||||
|
||||
data = cheevos_var_get_memory(&var);
|
||||
}
|
||||
addr = strtoul(arg, (char**)&arg, 16);
|
||||
data = (uint8_t *)rcheevos_patch_address(addr, rcheevos_get_console());
|
||||
|
||||
if (data)
|
||||
{
|
||||
@ -1119,9 +1088,7 @@ static void command_event_init_controllers(void)
|
||||
static void command_event_deinit_core(bool reinit)
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove settings init and test */
|
||||
settings_t *settings = config_get_ptr();
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_unload() : cheevos_unload();
|
||||
rcheevos_unload();
|
||||
#endif
|
||||
|
||||
RARCH_LOG("Unloading game..\n");
|
||||
@ -1174,8 +1141,7 @@ static void command_event_load_auto_state(void)
|
||||
return;
|
||||
#endif
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
if (rcheevos_hardcore_active)
|
||||
return;
|
||||
#endif
|
||||
if (!global || !settings->bools.savestate_auto_load)
|
||||
@ -1425,8 +1391,7 @@ static bool command_event_save_auto_state(void)
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
if (rcheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@ -1725,9 +1690,6 @@ static bool command_event_main_state(unsigned cmd)
|
||||
if (content_load_state(state_path, false, false))
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove duplication below */
|
||||
if (cheevos_hardcore_active)
|
||||
cheevos_state_loaded_flag = true;
|
||||
if (rcheevos_hardcore_active)
|
||||
rcheevos_state_loaded_flag = true;
|
||||
#endif
|
||||
@ -1876,8 +1838,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
return false;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
if (rcheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
if (!command_event_main_state(cmd))
|
||||
@ -1907,28 +1868,24 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event_init_controllers();
|
||||
break;
|
||||
case CMD_EVENT_RESET:
|
||||
/* RCHEEVOS TODO: remove starting block bracket, settings init and tests */
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
settings_t *settings = config_get_ptr();
|
||||
rcheevos_state_loaded_flag = cheevos_state_loaded_flag = false;
|
||||
rcheevos_hardcore_paused = cheevos_hardcore_paused = false;
|
||||
rcheevos_state_loaded_flag = false;
|
||||
rcheevos_hardcore_paused = false;
|
||||
#endif
|
||||
RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET));
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
RARCH_LOG("%s.\n", msg_hash_to_str(MSG_RESET));
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RESET), 1, 120, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_set_cheats() : cheevos_set_cheats();
|
||||
rcheevos_set_cheats();
|
||||
#endif
|
||||
core_reset();
|
||||
core_reset();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_reset_game() : cheevos_reset_game();
|
||||
rcheevos_reset_game();
|
||||
#endif
|
||||
#if HAVE_NETWORKING
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_RESET, NULL);
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_RESET, NULL);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
case CMD_EVENT_SAVE_STATE:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -2015,11 +1972,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove starting block bracket, settings init and test */
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_toggle_hardcore_mode() : cheevos_toggle_hardcore_mode();
|
||||
}
|
||||
rcheevos_toggle_hardcore_mode();
|
||||
#endif
|
||||
break;
|
||||
/* this fallthrough is on purpose, it should do
|
||||
@ -2060,8 +2013,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_REWIND_DEINIT:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
if (rcheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
state_manager_event_deinit();
|
||||
@ -2070,8 +2022,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove OR below */
|
||||
if (cheevos_hardcore_active || rcheevos_hardcore_active)
|
||||
if (rcheevos_hardcore_active)
|
||||
return false;
|
||||
#endif
|
||||
if (settings->bools.rewind_enable)
|
||||
|
@ -1559,8 +1559,6 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("cheevos_leaderboards_enable", &settings->bools.cheevos_leaderboards_enable, true, false, false);
|
||||
SETTING_BOOL("cheevos_verbose_enable", &settings->bools.cheevos_verbose_enable, true, false, false);
|
||||
SETTING_BOOL("cheevos_auto_screenshot", &settings->bools.cheevos_auto_screenshot, true, false, false);
|
||||
SETTING_BOOL("cheevos_old_enable", &settings->bools.cheevos_old_enable, true, false, false);
|
||||
/* RCHEEVOS TODO: remove line above */
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_BOOL("cheevos_badges_enable", &settings->bools.cheevos_badges_enable, true, false, false);
|
||||
#endif
|
||||
|
@ -250,7 +250,6 @@ typedef struct settings
|
||||
bool cheevos_badges_enable;
|
||||
bool cheevos_verbose_enable;
|
||||
bool cheevos_auto_screenshot;
|
||||
bool cheevos_old_enable; /* RCHEEVOS TODO: remove line */
|
||||
|
||||
/* Camera */
|
||||
bool camera_allow;
|
||||
|
@ -40,8 +40,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../cheevos/cheevos.h"
|
||||
#include "../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -36,8 +36,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "cheevos/cheevos.h"
|
||||
#include "cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL)
|
||||
@ -1939,8 +1938,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
{
|
||||
bool state = *(const bool*)data;
|
||||
RARCH_LOG("Environ SET_SUPPORT_ACHIEVEMENTS: %s.\n", state ? "yes" : "no");
|
||||
/* RCHEEVOS TODO: remove settings test */
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_set_support_cheevos(state) : cheevos_set_support_cheevos(state);
|
||||
rcheevos_set_support_cheevos(state);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
@ -157,12 +157,8 @@ ACHIEVEMENTS
|
||||
#include "../libretro-common/formats/json/jsonsax.c"
|
||||
#include "../network/net_http_special.c"
|
||||
|
||||
#include "../cheevos/cheevos.c"
|
||||
#include "../cheevos/badges.c"
|
||||
#include "../cheevos/cond.c"
|
||||
#include "../cheevos/var.c"
|
||||
|
||||
#include "../cheevos-new/cheevos.c"
|
||||
#include "../cheevos-new/badges.c"
|
||||
#include "../cheevos-new/fixup.c"
|
||||
#include "../cheevos-new/hash.c"
|
||||
#include "../cheevos-new/parser.c"
|
||||
|
@ -40,8 +40,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../cheevos/cheevos.h"
|
||||
#include "../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#include "cheat_manager.h"
|
||||
@ -69,8 +68,6 @@ unsigned cheat_manager_get_size(void)
|
||||
void cheat_manager_apply_cheats(void)
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove settings init */
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool data_bool = false;
|
||||
|
||||
#endif
|
||||
@ -104,8 +101,7 @@ void cheat_manager_apply_cheats(void)
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
data_bool = idx != 0;
|
||||
/* RCHEEVOS TODO: remove settings test */
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_apply_cheats(&data_bool) : cheevos_apply_cheats(&data_bool);
|
||||
rcheevos_apply_cheats(&data_bool);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -77,8 +77,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../cheevos/cheevos.h"
|
||||
#include "../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#include "../../record/record_driver.h"
|
||||
@ -3306,7 +3305,6 @@ static int action_ok_cheevos_toggle_hardcore_mode(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_hardcore_paused = !cheevos_hardcore_paused;
|
||||
rcheevos_hardcore_paused = !rcheevos_hardcore_paused;
|
||||
#endif
|
||||
generic_action_ok_command(CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE);
|
||||
|
@ -20,8 +20,7 @@
|
||||
#include "../menu_cbs.h"
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../../cheevos/cheevos.h"
|
||||
#include "../../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../../cheevos-new/cheevos.h"
|
||||
#endif
|
||||
#include "../../core_info.h"
|
||||
#include "../../verbosity.h"
|
||||
@ -143,7 +142,6 @@ default_sublabel_macro(action_bind_sublabel_cheevos_leaderboards_enable, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_cheevos_badges_enable, MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_cheevos_verbose_enable, MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_cheevos_auto_screenshot, MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT)
|
||||
default_sublabel_macro(action_bind_sublabel_cheevos_old_enable, MENU_ENUM_SUBLABEL_CHEEVOS_OLD_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_views_settings_list, MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_views_settings_list, MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_settings_list, MENU_ENUM_SUBLABEL_MENU_SETTINGS)
|
||||
@ -648,14 +646,12 @@ static int action_bind_sublabel_cheevos_entry(
|
||||
char *s, size_t len)
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
settings_t *settings = config_get_ptr(); /* RCHEEVOS TODO: remove line */
|
||||
cheevos_ctx_desc_t desc_info;
|
||||
rcheevos_ctx_desc_t desc_info;
|
||||
unsigned new_id = type - MENU_SETTINGS_CHEEVOS_START;
|
||||
desc_info.idx = new_id;
|
||||
desc_info.s = s;
|
||||
desc_info.len = len;
|
||||
/* RCHEEVOS TODO: remove test */
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_get_description((rcheevos_ctx_desc_t*) &desc_info) : cheevos_get_description(&desc_info);
|
||||
rcheevos_get_description((rcheevos_ctx_desc_t*) &desc_info);
|
||||
|
||||
strlcpy(s, desc_info.s, len);
|
||||
#endif
|
||||
@ -2210,9 +2206,6 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_CHEEVOS_AUTO_SCREENSHOT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_auto_screenshot);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_OLD_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_old_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_config_save_on_exit);
|
||||
break;
|
||||
|
@ -38,8 +38,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../cheevos/cheevos.h"
|
||||
#include "../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
@ -1789,8 +1788,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
MENU_ENUM_LABEL_SAVE_STATE,
|
||||
MENU_SETTING_ACTION_SAVESTATE, 0, 0);
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove 'rcheevos_*' below */
|
||||
if (!(rcheevos_hardcore_active || cheevos_hardcore_active))
|
||||
if (!rcheevos_hardcore_active)
|
||||
#endif
|
||||
{
|
||||
menu_entries_append_enum(info->list,
|
||||
@ -1805,8 +1803,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
settings->bools.quick_menu_show_undo_save_load_state)
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove 'rcheevos_*' below */
|
||||
if (!(rcheevos_hardcore_active || cheevos_hardcore_active))
|
||||
if (!rcheevos_hardcore_active)
|
||||
#endif
|
||||
{
|
||||
menu_entries_append_enum(info->list,
|
||||
@ -3666,7 +3663,6 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
{MENU_ENUM_LABEL_CHEEVOS_TEST_UNOFFICIAL, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_AUTO_SCREENSHOT, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_CHEEVOS_OLD_ENABLE, PARSE_ONLY_BOOL },
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
@ -5315,11 +5311,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
break;
|
||||
case DISPLAYLIST_ACHIEVEMENT_LIST:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
{ /* RCHEEVOS TODO: remove brackets, settings and settings test */
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_populate_menu(info) : cheevos_populate_menu(info);
|
||||
}
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
rcheevos_populate_menu(info);
|
||||
#endif
|
||||
info->need_push = true;
|
||||
info->need_refresh = true;
|
||||
|
@ -49,8 +49,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../cheevos/cheevos.h"
|
||||
#include "../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#include "../frontend/frontend_driver.h"
|
||||
@ -6041,8 +6040,7 @@ static void achievement_hardcore_mode_write_handler(rarch_setting_t *setting)
|
||||
|
||||
if (settings && settings->bools.cheevos_enable && settings->bools.cheevos_hardcore_mode_enable)
|
||||
{
|
||||
/* RCHEEVOS TODO: remove settings test */
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_toggle_hardcore_mode() : cheevos_toggle_hardcore_mode();
|
||||
rcheevos_toggle_hardcore_mode();
|
||||
command_event(CMD_EVENT_RESET, NULL);
|
||||
return;
|
||||
}
|
||||
@ -13199,22 +13197,6 @@ static bool setting_append_list(
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.cheevos_old_enable,
|
||||
MENU_ENUM_LABEL_CHEEVOS_OLD_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_OLD_ENABLE,
|
||||
false,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.cheevos_hardcore_mode_enable,
|
||||
|
@ -22,8 +22,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../../cheevos/cheevos.h"
|
||||
#include "../../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../../cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#include "menu_dialog.h"
|
||||
@ -46,7 +45,7 @@ static enum msg_hash_enums menu_dialog_current_msg = MSG_UNKNOWN;
|
||||
int menu_dialog_iterate(char *s, size_t len, const char *label)
|
||||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
cheevos_ctx_desc_t desc_info;
|
||||
rcheevos_ctx_desc_t desc_info;
|
||||
#endif
|
||||
bool do_exit = false;
|
||||
|
||||
@ -174,14 +173,10 @@ int menu_dialog_iterate(char *s, size_t len, const char *label)
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
case MENU_DIALOG_HELP_CHEEVOS_DESCRIPTION:
|
||||
{ /* RCHEEVOS TODO: remove brackets, settings and settings test */
|
||||
settings_t *settings = config_get_ptr();
|
||||
desc_info.idx = menu_dialog_current_id;
|
||||
desc_info.s = s;
|
||||
desc_info.len = len;
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_get_description((rcheevos_ctx_desc_t*) &desc_info) : cheevos_get_description(&desc_info);
|
||||
|
||||
}
|
||||
desc_info.idx = menu_dialog_current_id;
|
||||
desc_info.s = s;
|
||||
desc_info.len = len;
|
||||
rcheevos_get_description((rcheevos_ctx_desc_t*) &desc_info);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -29,8 +29,7 @@
|
||||
#include "../../core.h"
|
||||
#include "../../gfx/video_driver.h"
|
||||
#include "../../managers/core_option_manager.h"
|
||||
#include "../../cheevos/cheevos.h"
|
||||
#include "../../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../../cheevos-new/cheevos.h"
|
||||
#include "../../content.h"
|
||||
|
||||
#define BASIC_INFO "info"
|
||||
|
36
retroarch.c
36
retroarch.c
@ -78,8 +78,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "cheevos/cheevos.h"
|
||||
#include "cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISCORD
|
||||
@ -3276,8 +3275,7 @@ bool runloop_msg_queue_pull(const char **ret)
|
||||
*/
|
||||
#define time_to_exit(quit_key_pressed) (runloop_shutdown_initiated || quit_key_pressed || !is_alive || bsv_movie_is_end_of_file() || ((runloop_max_frames != 0) && (frame_count >= runloop_max_frames)) || runloop_exec)
|
||||
|
||||
/* RCHEEVOS TODO: remove 'rcheevos_*' tests below */
|
||||
#define runloop_check_cheevos() (settings->bools.cheevos_enable && (rcheevos_loaded || cheevos_loaded) && (!(rcheevos_cheats_are_enabled || cheats_are_enabled) && !(rcheevos_cheats_were_enabled || cheats_were_enabled)))
|
||||
#define runloop_check_cheevos() (settings->bools.cheevos_enable && rcheevos_loaded && (!rcheevos_cheats_are_enabled && !rcheevos_cheats_were_enabled))
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
/* FIXME: This is an ugly way to tell Netplay this... */
|
||||
@ -4174,32 +4172,17 @@ static enum runloop_state runloop_check_state(
|
||||
}
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove the 'rcheevos_*' below */
|
||||
rcheevos_hardcore_active = settings->bools.cheevos_enable
|
||||
&& settings->bools.cheevos_hardcore_mode_enable
|
||||
&& rcheevos_loaded && !rcheevos_hardcore_paused;
|
||||
|
||||
cheevos_hardcore_active = settings->bools.cheevos_enable
|
||||
&& settings->bools.cheevos_hardcore_mode_enable
|
||||
&& cheevos_loaded && !cheevos_hardcore_paused;
|
||||
if (!settings->bools.cheevos_old_enable)
|
||||
if (rcheevos_hardcore_active && rcheevos_state_loaded_flag)
|
||||
{
|
||||
if (rcheevos_hardcore_active && rcheevos_state_loaded_flag)
|
||||
{
|
||||
rcheevos_hardcore_paused = true;
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_DISABLED), 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cheevos_hardcore_active && cheevos_state_loaded_flag)
|
||||
{
|
||||
cheevos_hardcore_paused = true;
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_DISABLED), 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
rcheevos_hardcore_paused = true;
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_DISABLED), 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
if (!(rcheevos_hardcore_active || cheevos_hardcore_active))
|
||||
if (!rcheevos_hardcore_active)
|
||||
#endif
|
||||
{
|
||||
char s[128];
|
||||
@ -4225,8 +4208,7 @@ static enum runloop_state runloop_check_state(
|
||||
|
||||
/* Checks if slowmotion toggle/hold was being pressed and/or held. */
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* RCHEEVOS TODO: remove the 'rcheevos_*' below */
|
||||
if (!(rcheevos_hardcore_active || cheevos_hardcore_active))
|
||||
if (!rcheevos_hardcore_active)
|
||||
#endif
|
||||
{
|
||||
static bool old_slowmotion_button_state = false;
|
||||
@ -4588,8 +4570,8 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||
rarch_core_runtime_tick();
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (runloop_check_cheevos()) /* RCHEEVOS TODO: remove settings test */
|
||||
!settings->bools.cheevos_old_enable ? rcheevos_test() : cheevos_test();
|
||||
if (runloop_check_cheevos())
|
||||
rcheevos_test();
|
||||
#endif
|
||||
cheat_manager_apply_retro_cheats();
|
||||
|
||||
|
@ -70,8 +70,7 @@
|
||||
#include "../menu/menu_shader.h"
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../cheevos/cheevos.h"
|
||||
#include "../cheevos-new/cheevos.h" /* RCHEEVOS TODO: remove line */
|
||||
#include "../cheevos-new/cheevos.h"
|
||||
#endif
|
||||
|
||||
#include "task_content.h"
|
||||
@ -133,7 +132,6 @@ struct content_information_ctx
|
||||
char *directory_cache;
|
||||
char *directory_system;
|
||||
|
||||
bool cheevos_old_enable;
|
||||
bool is_ips_pref;
|
||||
bool is_bps_pref;
|
||||
bool is_ups_pref;
|
||||
@ -743,17 +741,11 @@ static bool content_file_load(
|
||||
const char *content_path = content->elems[0].data;
|
||||
enum rarch_content_type type = path_is_media_type(content_path);
|
||||
|
||||
if (content_ctx->cheevos_old_enable)
|
||||
cheevos_set_cheats();
|
||||
else
|
||||
rcheevos_set_cheats();
|
||||
rcheevos_set_cheats();
|
||||
|
||||
if (type == RARCH_CONTENT_NONE && !string_is_empty(content_path))
|
||||
{
|
||||
if (content_ctx->cheevos_old_enable)
|
||||
cheevos_load(info);
|
||||
else
|
||||
rcheevos_load(info);
|
||||
rcheevos_load(info);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1226,7 +1218,6 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info)
|
||||
if (!content_info)
|
||||
return false;
|
||||
|
||||
content_ctx.cheevos_old_enable = settings->bools.cheevos_old_enable;
|
||||
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
@ -1318,7 +1309,6 @@ bool task_push_load_content_from_playlist_from_menu(
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *sys_info = runloop_get_system_info();
|
||||
|
||||
content_ctx.cheevos_old_enable = settings->bools.cheevos_old_enable;
|
||||
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
@ -1417,7 +1407,6 @@ bool task_push_start_current_core(content_ctx_info_t *content_info)
|
||||
if (!content_info)
|
||||
return false;
|
||||
|
||||
content_ctx.cheevos_old_enable = settings->bools.cheevos_old_enable;
|
||||
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
@ -1542,7 +1531,6 @@ bool task_push_load_content_with_new_core_from_menu(
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
content_ctx.cheevos_old_enable = settings->bools.cheevos_old_enable;
|
||||
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
@ -1646,7 +1634,6 @@ static bool task_load_content_callback(content_ctx_info_t *content_info,
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *sys_info = runloop_get_system_info();
|
||||
|
||||
content_ctx.cheevos_old_enable = settings->bools.cheevos_old_enable;
|
||||
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
@ -2114,7 +2101,6 @@ bool content_init(void)
|
||||
|
||||
temporary_content = string_list_new();
|
||||
|
||||
content_ctx.cheevos_old_enable = settings->bools.cheevos_old_enable;
|
||||
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
||||
content_ctx.patch_is_blocked = rarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user