added cheevos_auto_screenshot
This commit is contained in:
parent
0d4833fb76
commit
6346f18133
|
@ -48,6 +48,7 @@
|
||||||
#include "cond.h"
|
#include "cond.h"
|
||||||
|
|
||||||
#include "../file_path_special.h"
|
#include "../file_path_special.h"
|
||||||
|
#include "../paths.h"
|
||||||
#include "../command.h"
|
#include "../command.h"
|
||||||
#include "../dynamic.h"
|
#include "../dynamic.h"
|
||||||
#include "../configuration.h"
|
#include "../configuration.h"
|
||||||
|
@ -1962,6 +1963,22 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
|
||||||
cheevos_make_unlock_url(cheevo, url, sizeof(url));
|
cheevos_make_unlock_url(cheevo, url, sizeof(url));
|
||||||
task_push_http_transfer(url, true, NULL,
|
task_push_http_transfer(url, true, NULL,
|
||||||
cheevos_unlocked, cheevo);
|
cheevos_unlocked, cheevo);
|
||||||
|
|
||||||
|
if(settings->bools.cheevos_auto_screenshot)
|
||||||
|
{
|
||||||
|
char shotname[256];
|
||||||
|
|
||||||
|
snprintf(shotname, sizeof(shotname), "%s/%s-cheevo-%u",
|
||||||
|
settings->paths.directory_screenshot,
|
||||||
|
path_basename(path_get(RARCH_PATH_BASENAME)),
|
||||||
|
cheevo->id);
|
||||||
|
shotname[sizeof(shotname) - 1] = '\0';
|
||||||
|
|
||||||
|
if(take_screenshot(shotname, true, video_driver_cached_frame_has_valid_framebuffer()))
|
||||||
|
RARCH_LOG("[CHEEVOS]: got a screenshot for cheevo %u\n", cheevo->id);
|
||||||
|
else
|
||||||
|
RARCH_LOG("[CHEEVOS]: failed to get screenshot for cheevo %u\n", cheevo->id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cheevo->last = valid;
|
cheevo->last = valid;
|
||||||
|
|
|
@ -1335,10 +1335,11 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||||
SETTING_BOOL("cheevos_test_unofficial", &settings->bools.cheevos_test_unofficial, true, false, false);
|
SETTING_BOOL("cheevos_test_unofficial", &settings->bools.cheevos_test_unofficial, true, false, false);
|
||||||
SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, false, false);
|
SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, false, false);
|
||||||
SETTING_BOOL("cheevos_leaderboards_enable", &settings->bools.cheevos_leaderboards_enable, true, false, false);
|
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);
|
||||||
#ifdef HAVE_XMB
|
#ifdef HAVE_XMB
|
||||||
SETTING_BOOL("cheevos_badges_enable", &settings->bools.cheevos_badges_enable, true, false, false);
|
SETTING_BOOL("cheevos_badges_enable", &settings->bools.cheevos_badges_enable, true, false, false);
|
||||||
#endif
|
#endif
|
||||||
SETTING_BOOL("cheevos_verbose_enable", &settings->bools.cheevos_verbose_enable, true, false, false);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
SETTING_BOOL("input_overlay_enable", &settings->bools.input_overlay_enable, true, config_overlay_enable_default(), false);
|
SETTING_BOOL("input_overlay_enable", &settings->bools.input_overlay_enable, true, config_overlay_enable_default(), false);
|
||||||
|
|
|
@ -195,6 +195,7 @@ typedef struct settings
|
||||||
bool cheevos_leaderboards_enable;
|
bool cheevos_leaderboards_enable;
|
||||||
bool cheevos_badges_enable;
|
bool cheevos_badges_enable;
|
||||||
bool cheevos_verbose_enable;
|
bool cheevos_verbose_enable;
|
||||||
|
bool cheevos_auto_screenshot;
|
||||||
|
|
||||||
/* Camera */
|
/* Camera */
|
||||||
bool camera_allow;
|
bool camera_allow;
|
||||||
|
|
|
@ -156,6 +156,8 @@ MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_USERNAME,
|
||||||
"cheevos_username")
|
"cheevos_username")
|
||||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE,
|
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE,
|
||||||
"cheevos_verbose_enable")
|
"cheevos_verbose_enable")
|
||||||
|
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_AUTO_SCREENSHOT,
|
||||||
|
"cheevos_auto_screenshot")
|
||||||
MSG_HASH(MENU_ENUM_LABEL_CLOSE_CONTENT,
|
MSG_HASH(MENU_ENUM_LABEL_CLOSE_CONTENT,
|
||||||
"unload_core")
|
"unload_core")
|
||||||
MSG_HASH(MENU_ENUM_LABEL_COLLECTION,
|
MSG_HASH(MENU_ENUM_LABEL_COLLECTION,
|
||||||
|
|
|
@ -502,6 +502,10 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE,
|
MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE,
|
||||||
"Achievements Verbose Mode"
|
"Achievements Verbose Mode"
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT,
|
||||||
|
"Achievements Automatic Screenshot"
|
||||||
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT,
|
MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT,
|
||||||
"Close Content"
|
"Close Content"
|
||||||
|
@ -1907,6 +1911,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE,
|
||||||
"Enable or disable badge display in Achievement List.")
|
"Enable or disable badge display in Achievement List.")
|
||||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE,
|
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE,
|
||||||
"Enable or disable OSD verbosity for achievements.")
|
"Enable or disable OSD verbosity for achievements.")
|
||||||
|
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT,
|
||||||
|
"Automatically take a screenshot when an achievement is triggered.")
|
||||||
MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS,
|
MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS,
|
||||||
"Change drivers used by the system.")
|
"Change drivers used by the system.")
|
||||||
MSG_HASH(MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS,
|
MSG_HASH(MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS,
|
||||||
|
|
|
@ -69,6 +69,7 @@ default_sublabel_macro(action_bind_sublabel_cheevos_hardcore_mode_enable, MENU_
|
||||||
default_sublabel_macro(action_bind_sublabel_cheevos_leaderboards_enable, MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE)
|
default_sublabel_macro(action_bind_sublabel_cheevos_leaderboards_enable, MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE)
|
||||||
default_sublabel_macro(action_bind_sublabel_cheevos_badges_enable, MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE)
|
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_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_menu_views_settings_list, MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS)
|
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_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)
|
default_sublabel_macro(action_bind_sublabel_menu_settings_list, MENU_ENUM_SUBLABEL_MENU_SETTINGS)
|
||||||
|
@ -1310,6 +1311,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||||
case MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE:
|
case MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_verbose_enable);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_verbose_enable);
|
||||||
break;
|
break;
|
||||||
|
case MENU_ENUM_LABEL_CHEEVOS_AUTO_SCREENSHOT:
|
||||||
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_auto_screenshot);
|
||||||
|
break;
|
||||||
case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT:
|
case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_config_save_on_exit);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_config_save_on_exit);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -5395,6 +5395,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||||
menu_displaylist_parse_settings_enum(menu, info,
|
menu_displaylist_parse_settings_enum(menu, info,
|
||||||
MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE,
|
MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE,
|
||||||
PARSE_ONLY_BOOL, false);
|
PARSE_ONLY_BOOL, false);
|
||||||
|
menu_displaylist_parse_settings_enum(menu, info,
|
||||||
|
MENU_ENUM_LABEL_CHEEVOS_AUTO_SCREENSHOT,
|
||||||
|
PARSE_ONLY_BOOL, false);
|
||||||
|
|
||||||
info->need_refresh = true;
|
info->need_refresh = true;
|
||||||
info->need_push = true;
|
info->need_push = true;
|
||||||
|
|
|
@ -6626,6 +6626,22 @@ static bool setting_append_list(
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CONFIG_BOOL(
|
||||||
|
list, list_info,
|
||||||
|
&settings->bools.cheevos_auto_screenshot,
|
||||||
|
MENU_ENUM_LABEL_CHEEVOS_AUTO_SCREENSHOT,
|
||||||
|
MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT,
|
||||||
|
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(
|
CONFIG_BOOL(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
&settings->bools.cheevos_hardcore_mode_enable,
|
&settings->bools.cheevos_hardcore_mode_enable,
|
||||||
|
|
|
@ -894,6 +894,7 @@ enum msg_hash_enums
|
||||||
MENU_LABEL(CHEEVOS_BADGES_ENABLE),
|
MENU_LABEL(CHEEVOS_BADGES_ENABLE),
|
||||||
MENU_LABEL(CHEEVOS_TEST_UNOFFICIAL),
|
MENU_LABEL(CHEEVOS_TEST_UNOFFICIAL),
|
||||||
MENU_LABEL(CHEEVOS_VERBOSE_ENABLE),
|
MENU_LABEL(CHEEVOS_VERBOSE_ENABLE),
|
||||||
|
MENU_LABEL(CHEEVOS_AUTO_SCREENSHOT),
|
||||||
MENU_LABEL(CHEEVOS_ENABLE),
|
MENU_LABEL(CHEEVOS_ENABLE),
|
||||||
MENU_LABEL(CHEEVOS_DESCRIPTION),
|
MENU_LABEL(CHEEVOS_DESCRIPTION),
|
||||||
MENU_LABEL(CHEEVOS_UNLOCKED_ACHIEVEMENTS),
|
MENU_LABEL(CHEEVOS_UNLOCKED_ACHIEVEMENTS),
|
||||||
|
|
Loading…
Reference in New Issue