Add Frame Time Counter settings

This commit is contained in:
twinaphex 2019-08-24 18:18:24 +02:00
parent f8fb2bf3dc
commit 94e2d646be
35 changed files with 256 additions and 4 deletions

View File

@ -1325,6 +1325,10 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
struct config_bool_setting *tmp = (struct config_bool_setting*)calloc(1, (*size + 1) * sizeof(struct config_bool_setting));
unsigned count = 0;
SETTING_BOOL("frame_time_counter_reset_after_fastforwarding", &settings->bools.frame_time_counter_reset_after_fastforwarding, true, false, false);
SETTING_BOOL("frame_time_counter_reset_after_load_state", &settings->bools.frame_time_counter_reset_after_load_state, true, false, false);
SETTING_BOOL("frame_time_counter_reset_after_save_state", &settings->bools.frame_time_counter_reset_after_save_state, true, false, false);
SETTING_BOOL("crt_switch_resolution_use_custom_refresh_rate", &settings->bools.crt_switch_custom_refresh_enable, true, false, false);
SETTING_BOOL("crt_switch_resolution_use_custom_refresh_rate", &settings->bools.crt_switch_custom_refresh_enable, true, false, false);
SETTING_BOOL("automatically_add_content_to_playlist", &settings->bools.automatically_add_content_to_playlist, true, DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, false);
SETTING_BOOL("ui_companion_start_on_boot", &settings->bools.ui_companion_start_on_boot, true, ui_companion_start_on_boot, false);

View File

@ -139,6 +139,11 @@ typedef struct settings
bool input_small_keyboard_enable;
bool input_keyboard_gamepad_enable;
/* Frame time counter */
bool frame_time_counter_reset_after_fastforwarding;
bool frame_time_counter_reset_after_load_state;
bool frame_time_counter_reset_after_save_state;
/* Menu */
bool filter_by_current_core;
bool menu_enable_widgets;

View File

@ -4112,3 +4112,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -5130,3 +5130,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -3888,3 +3888,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -4017,3 +4017,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -8094,3 +8094,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -3776,3 +3776,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -8246,3 +8246,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -9034,3 +9034,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -3997,3 +3997,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -9409,3 +9409,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -9241,3 +9241,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -265,6 +265,8 @@ MSG_HASH(MENU_ENUM_LABEL_DATABASE_MANAGER,
"database_manager")
MSG_HASH(MENU_ENUM_LABEL_DATABASE_MANAGER_LIST,
"database_manager_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_FRAME_TIME_COUNTER_SETTINGS_LIST,
"deferred_frame_time_counter_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_VIDEO_SHADER_PRESET_REMOVE_LIST,
"deferred_video_shader_preset_remove_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_VIDEO_SHADER_PRESET_SAVE_LIST,
@ -1093,6 +1095,8 @@ MSG_HASH(MENU_ENUM_LABEL_REWIND_BUFFER_SIZE_STEP,
"rewind_buffer_size_step")
MSG_HASH(MENU_ENUM_LABEL_REWIND_SETTINGS,
"rewind_settings")
MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS,
"frame_time_counter_settings")
MSG_HASH(MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE,
"vrr_runloop_enable")
MSG_HASH(MENU_ENUM_LABEL_CHEAT_SETTINGS,
@ -2063,3 +2067,9 @@ MSG_HASH(MENU_ENUM_LABEL_SETTINGS_SHOW_USER,
"settings_show_user")
MSG_HASH(MENU_ENUM_LABEL_SETTINGS_SHOW_DIRECTORY,
"settings_show_directory")
MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING,
"frame_time_counter_reset_after_fastforwarding")
MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
"frame_time_counter_reset_after_load_state")
MSG_HASH(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
"frame_time_counter_reset_after_save_state")

View File

@ -3770,3 +3770,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -4561,3 +4561,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -9321,3 +9321,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -3842,3 +3842,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -4040,3 +4040,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -9046,3 +9046,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -9567,3 +9567,19 @@ MSG_HASH(
MSG_HASH(
MSG_ERROR_REMOVING_SHADER_PRESET,
"Error removing shader preset.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING,
"Reset After Fastforward")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING,
"Reset the frame time counter after fastforwarding.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
"Reset After Load State")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
"Reset the frame time counter after loading a state.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
"Reset After Save State")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
"Reset the frame time counter after saving a state.")

View File

@ -3932,3 +3932,7 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
"Frame Time Counter")
MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS,
"Adjust settings influencing the frame time counter (only active when threaded video is disabled).")

View File

@ -152,6 +152,7 @@ generic_deferred_push(deferred_push_mixer_stream_settings_list, DISPLAYLIST_
generic_deferred_push(deferred_push_logging_settings_list, DISPLAYLIST_LOGGING_SETTINGS_LIST)
generic_deferred_push(deferred_push_frame_throttle_settings_list, DISPLAYLIST_FRAME_THROTTLE_SETTINGS_LIST)
generic_deferred_push(deferred_push_rewind_settings_list, DISPLAYLIST_REWIND_SETTINGS_LIST)
generic_deferred_push(deferred_push_frame_time_counter_settings_list, DISPLAYLIST_FRAME_TIME_COUNTER_SETTINGS_LIST)
generic_deferred_push(deferred_push_cheat_details_settings_list, DISPLAYLIST_CHEAT_DETAILS_SETTINGS_LIST)
generic_deferred_push(deferred_push_cheat_search_settings_list, DISPLAYLIST_CHEAT_SEARCH_SETTINGS_LIST)
generic_deferred_push(deferred_push_onscreen_display_settings_list, DISPLAYLIST_ONSCREEN_DISPLAY_SETTINGS_LIST)
@ -742,6 +743,11 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_frame_throttle_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FRAME_TIME_COUNTER_SETTINGS_LIST)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_frame_time_counter_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_REWIND_SETTINGS_LIST)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rewind_settings_list);
@ -1409,6 +1415,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_ENUM_LABEL_DEFERRED_FRAME_THROTTLE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_frame_throttle_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_FRAME_TIME_COUNTER_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_frame_time_counter_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_REWIND_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rewind_settings_list);
break;

View File

@ -206,6 +206,8 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
return MENU_ENUM_LABEL_DEFERRED_LOGGING_SETTINGS_LIST;
case ACTION_OK_DL_FRAME_THROTTLE_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_FRAME_THROTTLE_SETTINGS_LIST;
case ACTION_OK_DL_FRAME_TIME_COUNTER_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_FRAME_TIME_COUNTER_SETTINGS_LIST;
case ACTION_OK_DL_REWIND_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_REWIND_SETTINGS_LIST;
case ACTION_OK_DL_CHEAT_DETAILS_SETTINGS_LIST:
@ -1003,6 +1005,7 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_SAVING_SETTINGS_LIST:
case ACTION_OK_DL_LOGGING_SETTINGS_LIST:
case ACTION_OK_DL_FRAME_THROTTLE_SETTINGS_LIST:
case ACTION_OK_DL_FRAME_TIME_COUNTER_SETTINGS_LIST:
case ACTION_OK_DL_REWIND_SETTINGS_LIST:
case ACTION_OK_DL_ONSCREEN_DISPLAY_SETTINGS_LIST:
case ACTION_OK_DL_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST:
@ -4626,6 +4629,7 @@ default_action_ok_func(action_ok_compressed_archive_push, ACTION_OK_DL_COMPRESSE
default_action_ok_func(action_ok_compressed_archive_push_detect_core, ACTION_OK_DL_COMPRESSED_ARCHIVE_PUSH_DETECT_CORE)
default_action_ok_func(action_ok_logging_list, ACTION_OK_DL_LOGGING_SETTINGS_LIST)
default_action_ok_func(action_ok_frame_throttle_list, ACTION_OK_DL_FRAME_THROTTLE_SETTINGS_LIST)
default_action_ok_func(action_ok_frame_time_counter_list, ACTION_OK_DL_FRAME_TIME_COUNTER_SETTINGS_LIST)
default_action_ok_func(action_ok_rewind_list, ACTION_OK_DL_REWIND_SETTINGS_LIST)
default_action_ok_func(action_ok_cheat, ACTION_OK_DL_CHEAT_DETAILS_SETTINGS_LIST)
default_action_ok_func(action_ok_cheat_start_or_cont, ACTION_OK_DL_CHEAT_SEARCH_SETTINGS_LIST)
@ -6547,6 +6551,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_frame_throttle_list);
break;
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_frame_time_counter_list);
break;
case MENU_ENUM_LABEL_REWIND_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_rewind_list);
break;

View File

@ -145,6 +145,10 @@ default_sublabel_macro(action_bind_sublabel_network_on_demand_thumbnails, MENU_
default_sublabel_macro(action_bind_sublabel_user_settings_list, MENU_ENUM_SUBLABEL_USER_SETTINGS)
default_sublabel_macro(action_bind_sublabel_recording_settings_list, MENU_ENUM_SUBLABEL_RECORDING_SETTINGS)
default_sublabel_macro(action_bind_sublabel_frame_throttle_settings_list, MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_frame_time_counter_settings_list, MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS)
default_sublabel_macro(action_bind_sublabel_frame_time_counter_reset_after_fastforwarding, MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING)
default_sublabel_macro(action_bind_sublabel_frame_time_counter_reset_after_load_state, MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE)
default_sublabel_macro(action_bind_sublabel_frame_time_counter_reset_after_save_state, MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE)
default_sublabel_macro(action_bind_sublabel_onscreen_display_settings_list,MENU_ENUM_SUBLABEL_ONSCREEN_DISPLAY_SETTINGS)
default_sublabel_macro(action_bind_sublabel_core_settings_list, MENU_ENUM_SUBLABEL_CORE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_information_list_list, MENU_ENUM_SUBLABEL_INFORMATION_LIST_LIST)
@ -1468,6 +1472,15 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_SETTINGS_SHOW_FRAME_THROTTLE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_settings_show_frame_throttle);
break;
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_frame_time_counter_reset_after_fastforwarding);
break;
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_frame_time_counter_reset_after_load_state);
break;
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_frame_time_counter_reset_after_save_state);
break;
case MENU_ENUM_LABEL_SETTINGS_SHOW_RECORDING:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_settings_show_recording);
break;
@ -2691,6 +2704,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_frame_throttle_settings_list);
break;
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_frame_time_counter_settings_list);
break;
case MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_onscreen_display_settings_list);
break;

View File

@ -168,6 +168,7 @@ default_title_macro(action_get_dump_disc_list, MENU_ENUM_LABEL_
default_title_macro(action_get_saving_settings_list, MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS)
default_title_macro(action_get_logging_settings_list, MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS)
default_title_macro(action_get_frame_throttle_settings_list, MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS)
default_title_macro(action_get_frame_time_counter_settings_list, MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS)
default_title_macro(action_get_rewind_settings_list, MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS)
default_title_macro(action_get_cheat_details_settings_list, MENU_ENUM_LABEL_VALUE_CHEAT_DETAILS_SETTINGS)
default_title_macro(action_get_cheat_search_settings_list, MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_SETTINGS)
@ -445,6 +446,11 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
BIND_ACTION_GET_TITLE(cbs, action_get_logging_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FRAME_TIME_COUNTER_SETTINGS_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_frame_time_counter_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FRAME_THROTTLE_SETTINGS_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_frame_throttle_settings_list);

View File

@ -2778,6 +2778,7 @@ static void materialui_list_insert(void *userdata,
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ACCOUNTS_LIST)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REWIND_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST)) ||

View File

@ -278,6 +278,7 @@ menu_texture_item ozone_entries_icon_get_texture(ozone_handle_t *ozone,
case MENU_ENUM_LABEL_RESTART_RETROARCH:
case MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE:
case MENU_ENUM_LABEL_AUTOSAVE_INTERVAL:
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD];
case MENU_ENUM_LABEL_SHUTDOWN:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SHUTDOWN];

View File

@ -2366,6 +2366,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_RESTART_RETROARCH:
case MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE:
case MENU_ENUM_LABEL_AUTOSAVE_INTERVAL:
case MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS:
return xmb->textures.list[XMB_TEXTURE_RELOAD];
case MENU_ENUM_LABEL_RENAME_ENTRY:
return xmb->textures.list[XMB_TEXTURE_RENAME];

View File

@ -87,6 +87,7 @@ enum
ACTION_OK_DL_SAVING_SETTINGS_LIST,
ACTION_OK_DL_LOGGING_SETTINGS_LIST,
ACTION_OK_DL_FRAME_THROTTLE_SETTINGS_LIST,
ACTION_OK_DL_FRAME_TIME_COUNTER_SETTINGS_LIST,
ACTION_OK_DL_REWIND_SETTINGS_LIST,
ACTION_OK_DL_CHEAT_DETAILS_SETTINGS_LIST,
ACTION_OK_DL_CHEAT_SEARCH_SETTINGS_LIST,

View File

@ -5375,6 +5375,24 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
}
}
break;
case DISPLAYLIST_FRAME_TIME_COUNTER_SETTINGS_LIST:
{
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO, PARSE_ONLY_FLOAT, true},
{MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, PARSE_ONLY_BOOL, true},
};
for (i = 0; i < ARRAY_SIZE(build_list); i++)
{
if (menu_displaylist_parse_settings_enum(list,
build_list[i].enum_idx, build_list[i].parse_type,
false) == 0)
count++;
}
}
break;
case DISPLAYLIST_REWIND_SETTINGS_LIST:
{
menu_displaylist_build_info_t build_list[] = {
@ -5397,6 +5415,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{
menu_displaylist_build_info_t build_list[] = {
{MENU_ENUM_LABEL_REWIND_SETTINGS, PARSE_ACTION },
{MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS, PARSE_ACTION},
{MENU_ENUM_LABEL_FASTFORWARD_RATIO, PARSE_ONLY_FLOAT},
{MENU_ENUM_LABEL_SLOWMOTION_RATIO, PARSE_ONLY_FLOAT},
{MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE, PARSE_ONLY_BOOL },
@ -7204,6 +7223,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_MENU_SETTINGS_LIST:
case DISPLAYLIST_ADD_CONTENT_LIST:
case DISPLAYLIST_INPUT_SETTINGS_LIST:
case DISPLAYLIST_FRAME_TIME_COUNTER_SETTINGS_LIST:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
count = menu_displaylist_build_list(info->list, type);

View File

@ -139,6 +139,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_SAVING_SETTINGS_LIST,
DISPLAYLIST_LOGGING_SETTINGS_LIST,
DISPLAYLIST_FRAME_THROTTLE_SETTINGS_LIST,
DISPLAYLIST_FRAME_TIME_COUNTER_SETTINGS_LIST,
DISPLAYLIST_REWIND_SETTINGS_LIST,
DISPLAYLIST_CHEAT_DETAILS_SETTINGS_LIST,
DISPLAYLIST_CHEAT_SEARCH_SETTINGS_LIST,

View File

@ -132,6 +132,7 @@ enum settings_list_type
SETTINGS_LIST_INPUT_HOTKEY,
SETTINGS_LIST_RECORDING,
SETTINGS_LIST_FRAME_THROTTLING,
SETTINGS_LIST_FRAME_TIME_COUNTER,
SETTINGS_LIST_FONT,
SETTINGS_LIST_OVERLAY,
#ifdef HAVE_VIDEO_LAYOUT
@ -7297,6 +7298,14 @@ static bool setting_append_list(
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS,
MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
CONFIG_ACTION(
@ -8093,6 +8102,61 @@ static bool setting_append_list(
END_GROUP(list, list_info, parent_group);
}
break;
case SETTINGS_LIST_FRAME_TIME_COUNTER:
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS), parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_FRAME_TIME_COUNTER_SETTINGS);
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
CONFIG_BOOL(
list, list_info,
&settings->bools.frame_time_counter_reset_after_fastforwarding,
MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING,
MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING,
true,
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.frame_time_counter_reset_after_load_state,
MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE,
true,
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.frame_time_counter_reset_after_save_state,
MENU_ENUM_LABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE,
true,
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);
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_REWIND:
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS), parent_group);
@ -15837,6 +15901,7 @@ static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_inf
SETTINGS_LIST_INPUT_HOTKEY,
SETTINGS_LIST_RECORDING,
SETTINGS_LIST_FRAME_THROTTLING,
SETTINGS_LIST_FRAME_TIME_COUNTER,
SETTINGS_LIST_FONT,
SETTINGS_LIST_OVERLAY,
#ifdef HAVE_VIDEO_LAYOUT

View File

@ -1245,6 +1245,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_DEFERRED_SAVING_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_FRAME_THROTTLE_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_REWIND_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_FRAME_TIME_COUNTER_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_AI_SERVICE_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CHEAT_DETAILS_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CHEAT_SEARCH_SETTINGS_LIST,
@ -1867,6 +1868,10 @@ enum msg_hash_enums
MENU_LABEL(RECORDING_SETTINGS),
MENU_LABEL(OVERLAY_SETTINGS),
MENU_LABEL(REWIND_SETTINGS),
MENU_LABEL(FRAME_TIME_COUNTER_SETTINGS),
MENU_LABEL(FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING),
MENU_LABEL(FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE),
MENU_LABEL(FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE),
MENU_LABEL(CHEAT_SETTINGS),
MENU_LABEL(CHEAT_DETAILS_SETTINGS),
MENU_LABEL(CHEAT_SEARCH_SETTINGS),

View File

@ -4388,7 +4388,11 @@ static bool command_event_main_state(unsigned cmd)
{
case CMD_EVENT_SAVE_STATE:
content_save_state(state_path, true, false);
video_driver_monitor_reset();
{
settings_t *settings = configuration_settings;
if (settings->bools.frame_time_counter_reset_after_save_state)
video_driver_frame_time_count = 0;
}
ret = true;
push_msg = false;
break;
@ -4403,7 +4407,11 @@ static bool command_event_main_state(unsigned cmd)
#ifdef HAVE_NETWORKING
netplay_driver_ctl(RARCH_NETPLAY_CTL_LOAD_SAVESTATE, NULL);
#endif
video_driver_monitor_reset();
{
settings_t *settings = configuration_settings;
if (settings->bools.frame_time_counter_reset_after_load_state)
video_driver_frame_time_count = 0;
}
}
push_msg = false;
break;
@ -20482,7 +20490,7 @@ static void drivers_init(int flags)
struct retro_hw_render_callback *hwr =
video_driver_get_hw_context_internal();
video_driver_monitor_reset();
video_driver_frame_time_count = 0;
video_driver_lock_new();
video_driver_filter_free();
@ -23970,7 +23978,11 @@ static void update_fastforwarding_state(void)
if (menu_widgets_inited)
{
menu_widgets_fast_forward = false;
video_driver_monitor_reset();
{
settings_t *settings = configuration_settings;
if (settings->bools.frame_time_counter_reset_after_fastforwarding)
video_driver_frame_time_count = 0;
}
}
}
#endif