Merge branch 'master' into master

This commit is contained in:
toshixm 2019-08-25 03:33:55 +09:00 committed by GitHub
commit be0a8f970c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 773 additions and 166 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

@ -16,6 +16,7 @@
#ifndef CTR_COMMON_H__
#define CTR_COMMON_H__
#include <3ds.h>
#include <retro_inline.h>
#define COLOR_ABGR(r, g, b, a) (((unsigned)(a) << 24) | ((b) << 16) | ((g) << 8) | ((r) << 0))

View File

@ -1133,7 +1133,8 @@ void win32_check_window(bool *quit, bool *resize,
unsigned *width, unsigned *height)
{
#if !defined(_XBOX)
if (video_driver_is_threaded())
bool video_is_threaded = video_driver_is_threaded();
if (video_is_threaded)
ui_companion_win32.application->process_events();
*quit = g_win32_quit;
@ -1143,6 +1144,10 @@ void win32_check_window(bool *quit, bool *resize,
*width = g_win32_resize_width;
*height = g_win32_resize_height;
g_win32_resized = false;
#ifdef HAVE_MENU
rarch_ctl(RARCH_CTL_SET_DEFERRED_MENU_CONTEXT_RESET, NULL);
#endif
}
#endif
}

View File

@ -31,6 +31,8 @@
#include <ApplicationServices/ApplicationServices.h>
#endif
#include <file/file_path.h>
#include "../font_driver.h"
#define CT_ATLAS_ROWS 16
@ -262,7 +264,7 @@ static void *font_renderer_ct_init(const char *font_path, float font_size)
ct_font_renderer_t *handle = (ct_font_renderer_t*)
calloc(1, sizeof(*handle));
if (!handle || !string_is_valid(font_path))
if (!handle || !path_is_valid(font_path))
{
err = 1;
goto error;

View File

@ -4084,7 +4084,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -4112,3 +4112,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -5102,7 +5102,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -5130,3 +5130,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -3860,7 +3860,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -3888,3 +3888,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -3989,7 +3989,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -4017,3 +4017,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -8066,7 +8066,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -8094,3 +8094,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -3748,7 +3748,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -3776,3 +3776,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -8218,7 +8218,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -8246,3 +8246,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -9006,7 +9006,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -9034,3 +9034,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -3969,7 +3969,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -3997,3 +3997,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -9696,44 +9696,48 @@ MSG_HASH(
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_IMAGE_MODE,
"Image Mode"
)
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SPEECH_MODE,
"Speech Mode"
)
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL,
"Remove the Global Preset, used by all content and all cores."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL,
"Remove Global Preset")
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_CORE,
"Remove Core Preset"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL,
"Remove the Global Preset, used by all content and all cores.")
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_CORE,
"Remove the Core Preset, used by all content ran with the currently loaded core."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_CORE,
"Remove Core Preset")
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_PARENT,
"Remove Content Directory Preset"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_CORE,
"Remove the Core Preset, used by all content ran with the currently loaded core.")
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT,
"Remove the Content Directory Preset, used by all content inside the current working directory."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_PARENT,
"Remove Content Directory Preset")
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove Game Preset"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT,
"Remove the Content Directory Preset, used by all content inside the current working directory.")
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_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove Game Preset")
MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY,
"Shader preset removed successfully."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
"Remove the Game Preset, used only for the specific game in question.")
MSG_HASH(
MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY,
"Shader preset removed successfully.")
MSG_HASH(
MSG_ERROR_REMOVING_SHADER_PRESET,
"Error removing shader preset.")
MSG_ERROR_REMOVING_SHADER_PRESET,
"Error removing shader preset."
)

View File

@ -9213,7 +9213,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -9241,3 +9241,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

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,
@ -843,6 +845,8 @@ MSG_HASH(MENU_ENUM_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE,
"no_playlist_entries_available")
MSG_HASH(MENU_ENUM_LABEL_NO_SETTINGS_FOUND,
"menu_label_no_settings_found")
MSG_HASH(MENU_ENUM_LABEL_NO_PRESETS_FOUND,
"menu_label_no_presets_found")
MSG_HASH(MENU_ENUM_LABEL_NO_SHADER_PARAMETERS,
"no_shader_parameters.")
MSG_HASH(MENU_ENUM_LABEL_ONLINE,
@ -1091,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,
@ -2061,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

@ -3742,7 +3742,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -3770,3 +3770,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -4533,7 +4533,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -4561,3 +4561,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -9293,7 +9293,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -9321,3 +9321,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -3814,7 +3814,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -3842,3 +3842,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -4012,7 +4012,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -4040,3 +4040,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -9018,7 +9018,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -9046,3 +9046,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

View File

@ -2032,6 +2032,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND,
"No settings found."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_NO_PRESETS_FOUND,
"No automatic shader presets found."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_NO_SHADER_PARAMETERS,
"No shader parameters."
@ -3874,7 +3878,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE,
"Save ..."
"Save"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_AS,
@ -6594,7 +6598,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE,
"Save shader preset as ..."
"Save the current shader preset."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_AS,
@ -8542,6 +8546,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_QT_REMOVE,
"Remove"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QT_REMOVE_PASSES,
"Remove Passes"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QT_APPLY,
"Apply"
@ -9525,10 +9533,10 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
"Remove an automatic shader preset.")
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL,
"Remove Global Preset")
@ -9559,3 +9567,27 @@ 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.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT,
"The animation that triggers when scrolling between tabs.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN,
"The animation that triggers when moving up or down.")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU,
"The animation that triggers when opening a submenu.")

View File

@ -3904,7 +3904,7 @@ MSG_HASH(
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE,
"Remove ...")
"Remove")
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE,
"Remove shader presets of a specific type.")
@ -3932,3 +3932,9 @@ 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).")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE,
"Use modern decorated animations, notifications, indicators and controls instead of the old text only system.")

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:
@ -316,6 +318,8 @@ static const char *get_default_shader_dir(void)
{
settings_t *settings = config_get_ptr();
const char *def_shader_dir = settings->paths.directory_video_shader;
return def_shader_dir;
#if 0
bool slang_supported = video_shader_is_supported(RARCH_SHADER_SLANG);
bool glsl_supported = video_shader_is_supported(RARCH_SHADER_GLSL);
bool cg_supported = video_shader_is_supported(RARCH_SHADER_CG);
@ -352,6 +356,7 @@ static const char *get_default_shader_dir(void)
}
return def_shader_dir;
#endif
}
#endif
@ -1003,6 +1008,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:
@ -1410,7 +1416,7 @@ static int set_path_generic(const char *label, const char *action_path)
return 0;
}
static int generic_action_ok_command(enum event_command cmd)
int generic_action_ok_command(enum event_command cmd)
{
#ifdef HAVE_AUDIOMIXER
settings_t *settings = config_get_ptr();
@ -2739,10 +2745,16 @@ static int generic_action_ok_shader_preset_remove(const char *path,
}
if (menu_shader_manager_remove_auto_preset(preset_type))
{
bool refresh = false;
runloop_msg_queue_push(
msg_hash_to_str(MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY),
1, 100, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
}
else
runloop_msg_queue_push(
msg_hash_to_str(MSG_ERROR_REMOVING_SHADER_PRESET),
@ -4620,6 +4632,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)
@ -6541,6 +6554,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

@ -49,6 +49,8 @@
cbs->action_start_ident = #name;
#endif
int generic_action_ok_command(enum event_command cmd);
#ifdef HAVE_AUDIOMIXER
static int action_start_audio_mixer_stream_volume(unsigned type, const char *label)
{
@ -323,6 +325,17 @@ static int action_start_video_resolution(unsigned type, const char *label)
return 0;
}
static int action_start_load_core(unsigned type, const char *label)
{
int ret = generic_action_ok_command(
CMD_EVENT_UNLOAD_CORE);
bool refresh = false;
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
return 0;
}
static int action_start_lookup_setting(unsigned type, const char *label)
{
return menu_setting_set(type, MENU_ACTION_START, false);
@ -334,6 +347,9 @@ static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs)
{
switch (cbs->enum_idx)
{
case MENU_ENUM_LABEL_CORE_LIST:
BIND_ACTION_START(cbs, action_start_load_core);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET:
BIND_ACTION_START(cbs, action_start_shader_preset);
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)
@ -265,6 +269,7 @@ default_sublabel_macro(action_bind_sublabel_network_information, MENU_
default_sublabel_macro(action_bind_sublabel_system_information, MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION)
default_sublabel_macro(action_bind_sublabel_quit_retroarch, MENU_ENUM_SUBLABEL_QUIT_RETROARCH)
default_sublabel_macro(action_bind_sublabel_restart_retroarch, MENU_ENUM_SUBLABEL_RESTART_RETROARCH)
default_sublabel_macro(action_bind_sublabel_menu_widgets, MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE)
default_sublabel_macro(action_bind_sublabel_video_window_width, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH)
default_sublabel_macro(action_bind_sublabel_video_window_height, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT)
default_sublabel_macro(action_bind_sublabel_video_fullscreen_x, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X)
@ -476,6 +481,9 @@ default_sublabel_macro(action_bind_sublabel_menu_use_preferred_system_color_them
default_sublabel_macro(action_bind_sublabel_menu_wallpaper_opacity, MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY)
default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY)
default_sublabel_macro(action_bind_sublabel_menu_horizontal_animation, MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION)
default_sublabel_macro(action_bind_sublabel_menu_xmb_animation_horizontal_higlight, MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT)
default_sublabel_macro(action_bind_sublabel_menu_xmb_animation_move_up_down, MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN)
default_sublabel_macro(action_bind_sublabel_menu_xmb_animation_opening_main_menu, MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU)
default_sublabel_macro(action_bind_sublabel_menu_ribbon_enable, MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE)
default_sublabel_macro(action_bind_sublabel_menu_font, MENU_ENUM_SUBLABEL_XMB_FONT)
default_sublabel_macro(action_bind_sublabel_settings_show_drivers, MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DRIVERS)
@ -1468,6 +1476,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;
@ -1655,6 +1672,15 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MENU_HORIZONTAL_ANIMATION:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_horizontal_animation);
break;
case MENU_ENUM_LABEL_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_xmb_animation_horizontal_higlight);
break;
case MENU_ENUM_LABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_xmb_animation_move_up_down);
break;
case MENU_ENUM_LABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_xmb_animation_opening_main_menu);
break;
case MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_wallpaper_opacity);
break;
@ -2284,6 +2310,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_QUIT_RETROARCH:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quit_retroarch);
break;
case MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_widgets);
break;
case MENU_ENUM_LABEL_RESTART_RETROARCH:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_restart_retroarch);
break;
@ -2691,6 +2720,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)
@ -269,6 +270,8 @@ default_title_copy_macro(action_get_title_cheevos_list, MENU_ENUM_LABE
default_title_copy_macro(action_get_title_video_shader_parameters,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS)
default_title_copy_macro(action_get_title_video_shader_preset_parameters,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_PARAMETERS)
default_title_copy_macro(action_get_title_video_shader_preset_save,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE)
default_title_copy_macro(action_get_title_video_shader_preset_remove,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE)
default_title_copy_macro(action_get_title_video_shader_preset_save_list,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE)
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
default_title_macro(action_get_title_switch_cpu_profile, MENU_ENUM_LABEL_VALUE_SWITCH_CPU_PROFILE)
@ -445,6 +448,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);
@ -1396,6 +1404,18 @@ int menu_cbs_init_bind_title(menu_file_list_cbs_t *cbs,
return 0;
}
#endif
if (string_is_equal(label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_VIDEO_SHADER_PRESET_SAVE_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_title_video_shader_preset_save_list);
return 0;
}
if (string_is_equal(label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_VIDEO_SHADER_PRESET_REMOVE_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_title_video_shader_preset_remove);
return 0;
}
if (string_is_equal(label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST)))
{

View File

@ -1949,6 +1949,7 @@ static void materialui_context_reset(void *data, bool is_threaded)
task_push_image_load(settings->paths.path_menu_wallpaper,
video_driver_supports_rgba(), 0,
menu_display_handle_wallpaper_upload, NULL);
video_driver_monitor_reset();
}
static int materialui_environ(enum menu_environ_cb type, void *data, void *userdata)
@ -2495,8 +2496,9 @@ static void materialui_list_insert(void *userdata,
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NO_CORE_INFORMATION_AVAILABLE)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NO_ITEMS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NO_CORE_OPTIONS_AVAILABLE)) ||
(string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INFORMATION))) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NO_SETTINGS_FOUND))
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INFORMATION)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NO_SETTINGS_FOUND)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NO_PRESETS_FOUND))
)
{
node->texture_switch2_index = MUI_TEXTURE_INFO;
@ -2777,6 +2779,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

@ -673,6 +673,7 @@ static void ozone_context_reset(void *data, bool is_threaded)
ozone_restart_cursor_animation(ozone);
}
video_driver_monitor_reset();
}
static void ozone_collapse_end(void *userdata)

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

@ -4959,6 +4959,7 @@ static void rgui_context_reset(void *data, bool is_threaded)
if (rgui->widgets_supported)
menu_display_allocate_white_texture();
video_driver_monitor_reset();
}
static void rgui_context_destroy(void *data)

View File

@ -3734,6 +3734,7 @@ static void stripes_context_reset(void *data, bool is_threaded)
free(iconpath);
}
video_driver_monitor_reset();
}
static void stripes_navigation_clear(void *data, bool pending_push)

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];
@ -5271,6 +5272,7 @@ static void xmb_context_reset(void *data, bool is_threaded)
if (xmb)
xmb_context_reset_internal(xmb, is_threaded, true);
video_driver_monitor_reset();
}
static void xmb_navigation_clear(void *data, bool pending_push)

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 },
@ -6291,13 +6310,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
if (settings->bools.video_shader_enable)
{
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SHADER_APPLY_CHANGES),
msg_hash_to_str(MENU_ENUM_LABEL_SHADER_APPLY_CHANGES),
MENU_ENUM_LABEL_SHADER_APPLY_CHANGES,
MENU_SETTING_ACTION, 0, 0))
count++;
if (frontend_driver_can_watch_for_changes())
{
if (menu_entries_append_enum(info->list,
@ -6328,12 +6340,20 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SHADER_APPLY_CHANGES),
msg_hash_to_str(MENU_ENUM_LABEL_SHADER_APPLY_CHANGES),
MENU_ENUM_LABEL_SHADER_APPLY_CHANGES,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS),
MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES),
@ -7203,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);
@ -8214,33 +8235,44 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
{
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_shader_manager_auto_preset_exists(SHADER_PRESET_GLOBAL))
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_CORE),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_CORE),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_CORE,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_shader_manager_auto_preset_exists(SHADER_PRESET_CORE))
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_CORE),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_CORE),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_CORE,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_PARENT),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_shader_manager_auto_preset_exists(SHADER_PRESET_PARENT))
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_PARENT),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GAME),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GAME),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
MENU_SETTING_ACTION, 0, 0))
count++;
if (menu_shader_manager_auto_preset_exists(SHADER_PRESET_GAME))
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GAME),
msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GAME),
MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE_GAME,
MENU_SETTING_ACTION, 0, 0))
count++;
if (count == 0)
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_PRESETS_FOUND),
msg_hash_to_str(MENU_ENUM_LABEL_NO_PRESETS_FOUND),
MENU_ENUM_LABEL_NO_PRESETS_FOUND,
0, 0, 0);
#endif
}

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

@ -45,6 +45,18 @@ void menu_shader_set_modified(bool modified)
menu_driver_shader_modified = modified;
}
static enum rarch_shader_type shader_types[] =
{
RARCH_SHADER_GLSL, RARCH_SHADER_SLANG, RARCH_SHADER_CG
};
enum auto_shader_operation
{
AUTO_SHADER_OP_SAVE = 0,
AUTO_SHADER_OP_REMOVE,
AUTO_SHADER_OP_EXISTS
};
struct video_shader *menu_shader_get(void)
{
if (video_shader_any_supported())
@ -316,8 +328,7 @@ static bool menu_shader_manager_save_preset_internal(
return ret;
}
/** Saves or deletes an auto-shader, save = false requires no other parameters */
static bool menu_shader_manager_operate_auto_preset(bool save,
static bool menu_shader_manager_operate_auto_preset(enum auto_shader_operation op,
const struct video_shader *shader, enum auto_shader_type type, bool apply)
{
char tmp[PATH_MAX_LENGTH];
@ -379,25 +390,20 @@ static bool menu_shader_manager_operate_auto_preset(bool save,
return false;
}
if (save)
if (op == AUTO_SHADER_OP_SAVE)
{
if (!path_is_directory(directory))
path_mkdir(directory);
return menu_shader_manager_save_preset_internal(shader, file, apply, true);
}
else
else if (op == AUTO_SHADER_OP_REMOVE)
{
/* remove all supported auto-shaders of given type */
char *end = file + strlen(file);
size_t i;
bool success = false;
static enum rarch_shader_type shader_types[] =
{
RARCH_SHADER_GLSL, RARCH_SHADER_SLANG, RARCH_SHADER_CG
};
/* remove all supported auto-shaders of given type */
for (i = 0; i < ARRAY_SIZE(shader_types); i++)
{
const char *preset_ext;
@ -414,6 +420,30 @@ static bool menu_shader_manager_operate_auto_preset(bool save,
return success;
}
else if (op == AUTO_SHADER_OP_EXISTS)
{
/* test if any supported auto-shaders of given type exists */
char *end = file + strlen(file);
size_t i;
for (i = 0; i < ARRAY_SIZE(shader_types); i++)
{
const char *preset_ext;
if (!video_shader_is_supported(shader_types[i]))
continue;
preset_ext = video_shader_get_preset_extension(shader_types[i]);
strlcpy(end, preset_ext, sizeof(file) - (end-file));
if (path_is_valid(file))
return true;
}
return false;
}
return false;
}
/**
@ -433,7 +463,7 @@ static bool menu_shader_manager_operate_auto_preset(bool save,
bool menu_shader_manager_save_auto_preset(const struct video_shader *shader,
enum auto_shader_type type, bool apply)
{
return menu_shader_manager_operate_auto_preset(true, shader, type, apply);
return menu_shader_manager_operate_auto_preset(AUTO_SHADER_OP_SAVE, shader, type, apply);
}
/**
@ -459,7 +489,18 @@ bool menu_shader_manager_save_preset(const struct video_shader *shader,
**/
bool menu_shader_manager_remove_auto_preset(enum auto_shader_type type)
{
return menu_shader_manager_operate_auto_preset(false, NULL, type, false);
return menu_shader_manager_operate_auto_preset(AUTO_SHADER_OP_REMOVE, NULL, type, false);
}
/**
* menu_shader_manager_auto_preset_exists:
* @type : type of shader preset
*
* Tests if an auto-shader of the given type exists.
**/
bool menu_shader_manager_auto_preset_exists(enum auto_shader_type type)
{
return menu_shader_manager_operate_auto_preset(AUTO_SHADER_OP_EXISTS, NULL, type, false);
}
int menu_shader_manager_clear_num_passes(struct video_shader *shader)

View File

@ -124,6 +124,8 @@ void menu_shader_manager_clear_pass_path(struct video_shader *shader,
**/
bool menu_shader_manager_remove_auto_preset(enum auto_shader_type type);
bool menu_shader_manager_auto_preset_exists(enum auto_shader_type type);
void menu_shader_set_modified(bool modified);
RETRO_END_DECLS

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,
@ -1336,6 +1337,7 @@ enum msg_hash_enums
MENU_LABEL(LOAD_CONTENT_LIST),
MENU_LABEL(LOAD_CONTENT_SPECIAL),
MENU_LABEL(NO_SETTINGS_FOUND),
MENU_LABEL(NO_PRESETS_FOUND),
MENU_LABEL(NO_NETWORKS_FOUND),
MENU_LABEL(NO_PERFORMANCE_COUNTERS),
MENU_LABEL(FRAME_THROTTLE_SETTINGS),
@ -1866,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),
@ -2396,6 +2402,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_VALUE_QT_LOAD,
MENU_ENUM_LABEL_VALUE_QT_SAVE,
MENU_ENUM_LABEL_VALUE_QT_REMOVE,
MENU_ENUM_LABEL_VALUE_QT_REMOVE_PASSES,
MENU_ENUM_LABEL_VALUE_QT_APPLY,
MENU_ENUM_LABEL_VALUE_QT_SHADER_ADD_PASS,
MENU_ENUM_LABEL_VALUE_QT_SHADER_CLEAR_ALL_PASSES,

View File

@ -824,6 +824,16 @@ static settings_t *configuration_settings = NULL;
static enum rarch_core_type current_core_type = CORE_TYPE_PLAIN;
static enum rarch_core_type explicit_current_core_type = CORE_TYPE_PLAIN;
/*
* Override poll type behavior, is set by the core.
*
* 0 - Don't Care
* 1 - Early
* 2 - Normal
* 3 - Late
*/
static unsigned core_poll_type_override = 0;
static bool has_set_username = false;
#ifdef HAVE_THREAD_STORAGE
@ -839,6 +849,9 @@ static retro_keyboard_event_t runloop_key_event = NULL;
static retro_keyboard_event_t runloop_frontend_key_event = NULL;
static core_option_manager_t *runloop_core_options = NULL;
static msg_queue_t *runloop_msg_queue = NULL;
#ifdef HAVE_MENU
static bool runloop_set_deferred_menu_context_reset = false;
#endif
static unsigned runloop_pending_windowed_scale = 0;
static unsigned runloop_max_frames = 0;
@ -2222,10 +2235,12 @@ bool retroarch_apply_shader(enum rarch_shader_type type, const char *preset_path
configuration_set_bool(settings, settings->bools.video_shader_enable, true);
retroarch_set_runtime_shader_preset(preset_path);
#ifdef HAVE_MENU
/* reflect in shader manager */
if (menu_shader_manager_set_preset(menu_shader_get(), type, preset_path, false))
if (!string_is_empty(preset_path))
menu_shader_set_modified(false);
#endif
/* Display message */
snprintf(msg, sizeof(msg),
@ -3864,7 +3879,10 @@ static bool event_init_content(void)
path_fill_names();
if (!content_init())
{
runloop_core_running = false;
return false;
}
command_event_set_savestate_auto_index();
@ -4383,6 +4401,11 @@ static bool command_event_main_state(unsigned cmd)
{
case CMD_EVENT_SAVE_STATE:
content_save_state(state_path, true, false);
{
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;
@ -4397,6 +4420,11 @@ static bool command_event_main_state(unsigned cmd)
#ifdef HAVE_NETWORKING
netplay_driver_ctl(RARCH_NETPLAY_CTL_LOAD_SAVESTATE, NULL);
#endif
{
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;
@ -7721,15 +7749,6 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
break;
}
case RETRO_ENVIRONMENT_SET_SAVE_STATE_IN_BACKGROUND:
{
bool state = *(const bool*)data;
RARCH_LOG("Environ SET_SAVE_STATE_IN_BACKGROUND: %s.\n", state ? "yes" : "no");
set_save_state_in_background(state);
break;
}
case RETRO_ENVIRONMENT_GET_LIBRETRO_PATH:
{
@ -8279,10 +8298,6 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
*(bool *)data = runloop_fastmotion;
break;
case RETRO_ENVIRONMENT_GET_CLEAR_ALL_THREAD_WAITS_CB:
*(retro_environment_t *)data = rarch_clear_all_thread_waits;
break;
case RETRO_ENVIRONMENT_GET_INPUT_BITMASKS:
/* Just falldown, the function will return true */
break;
@ -8306,6 +8321,35 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
break;
}
/* Private environment callbacks.
*
* Should all be properly addressed in version 2.
* */
case RETRO_ENVIRONMENT_POLL_TYPE_OVERRIDE:
{
const unsigned *poll_type_data = (const unsigned*)data;
if (poll_type_data)
core_poll_type_override = *poll_type_data;
}
break;
case RETRO_ENVIRONMENT_GET_CLEAR_ALL_THREAD_WAITS_CB:
*(retro_environment_t *)data = rarch_clear_all_thread_waits;
break;
case RETRO_ENVIRONMENT_SET_SAVE_STATE_IN_BACKGROUND:
{
bool state = *(const bool*)data;
RARCH_LOG("Environ SET_SAVE_STATE_IN_BACKGROUND: %s.\n", state ? "yes" : "no");
set_save_state_in_background(state);
}
break;
default:
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
return false;
@ -8761,6 +8805,8 @@ static void secondary_core_destroy(void)
/* unload game from core */
if (secondary_core.retro_unload_game)
secondary_core.retro_unload_game();
core_poll_type_override = 0;
/* deinit */
if (secondary_core.retro_deinit)
secondary_core.retro_deinit();
@ -20475,7 +20521,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();
@ -20548,9 +20594,7 @@ static void drivers_init(int flags)
&& video_driver_has_widgets())
{
if (!menu_widgets_inited)
{
menu_widgets_inited = menu_widgets_init(video_is_threaded);
}
if (menu_widgets_inited)
menu_widgets_context_reset(video_is_threaded,
@ -21083,6 +21127,7 @@ static void unload_hook(void)
secondary_core_destroy();
if (current_core.retro_unload_game)
current_core.retro_unload_game();
core_poll_type_override = 0;
}
static void runahead_deinit_hook(void)
@ -22947,6 +22992,11 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
{
switch(state)
{
case RARCH_CTL_SET_DEFERRED_MENU_CONTEXT_RESET:
#ifdef HAVE_MENU
runloop_set_deferred_menu_context_reset = true;
#endif
break;
case RARCH_CTL_CORE_IS_RUNNING:
return runloop_core_running;
case RARCH_CTL_BSV_MOVIE_IS_INITED:
@ -23961,7 +24011,14 @@ static void update_fastforwarding_state(void)
else
{
if (menu_widgets_inited)
{
menu_widgets_fast_forward = false;
{
settings_t *settings = configuration_settings;
if (settings->bools.frame_time_counter_reset_after_fastforwarding)
video_driver_frame_time_count = 0;
}
}
}
#endif
}
@ -24273,6 +24330,14 @@ static enum runloop_state runloop_check_state(void)
if (menu_data)
{
if (runloop_set_deferred_menu_context_reset)
{
if (menu_data->driver_ctx && menu_data->driver_ctx->context_reset)
menu_data->driver_ctx->context_reset(menu_data->userdata, video_driver_is_threaded_internal());
video_driver_frame_count = 0;
runloop_set_deferred_menu_context_reset = false;
}
if (BIT64_GET(menu_data->state, MENU_STATE_RENDER_FRAMEBUFFER)
!= BIT64_GET(menu_data->state, MENU_STATE_RENDER_MESSAGEBOX))
BIT64_SET(menu_data->state, MENU_STATE_RENDER_FRAMEBUFFER);
@ -26004,14 +26069,20 @@ static int16_t core_input_state_poll_late(unsigned port,
static retro_input_state_t core_input_state_poll_return_cb(void)
{
if (current_core.poll_type == POLL_TYPE_LATE)
unsigned new_poll_type = (core_poll_type_override > 0)
? (core_poll_type_override - 1)
: current_core.poll_type;
if (new_poll_type == POLL_TYPE_LATE)
return core_input_state_poll_late;
return core_input_state_poll;
}
static void core_input_state_poll_maybe(void)
{
if (current_core.poll_type == POLL_TYPE_NORMAL)
unsigned new_poll_type = (core_poll_type_override > 0)
? (core_poll_type_override - 1)
: current_core.poll_type;
if (new_poll_type == POLL_TYPE_NORMAL)
input_driver_poll();
}
@ -26251,6 +26322,7 @@ static bool core_unload_game(void)
if (current_core.game_loaded)
{
current_core.retro_unload_game();
core_poll_type_override = 0;
current_core.game_loaded = false;
}
@ -26261,8 +26333,11 @@ static bool core_unload_game(void)
bool core_run(void)
{
bool early_polling = current_core.poll_type == POLL_TYPE_EARLY;
bool late_polling = current_core.poll_type == POLL_TYPE_LATE;
unsigned new_poll_type = (core_poll_type_override != 0)
? (core_poll_type_override - 1)
: current_core.poll_type;
bool early_polling = new_poll_type == POLL_TYPE_EARLY;
bool late_polling = new_poll_type == POLL_TYPE_LATE;
#ifdef HAVE_NETWORKING
bool netplay_preframe = netplay_driver_ctl(
RARCH_NETPLAY_CTL_PRE_FRAME, NULL);

View File

@ -64,6 +64,20 @@ RETRO_BEGIN_DECLS
* between the core and the frontend to gracefully stop all threads.
*/
#define RETRO_ENVIRONMENT_POLL_TYPE_OVERRIDE (4 | RETRO_ENVIRONMENT_RETROARCH_START_BLOCK)
/* unsigned * --
* Tells the frontend to override the poll type behavior.
* Allows the frontend to influence the polling behavior of the
* frontend.
*
* Will be unset when retro_unload_game is called.
*
* 0 - Don't Care, no changes, frontend still determines polling type behavior.
* 1 - Early
* 2 - Normal
* 3 - Late
*/
enum rarch_ctl_state
{
RARCH_CTL_NONE = 0,
@ -161,6 +175,7 @@ enum rarch_ctl_state
RARCH_CTL_CORE_OPTIONS_DEINIT,
RARCH_CTL_CORE_OPTIONS_DISPLAY,
RARCH_CTL_CORE_IS_RUNNING,
RARCH_CTL_SET_DEFERRED_MENU_CONTEXT_RESET,
/* BSV Movie */
RARCH_CTL_BSV_MOVIE_IS_INITED

View File

@ -18,6 +18,7 @@
#include "shaderparamsdialog.h"
#include "../ui_qt.h"
#include "../../../menu/menu_entries.h"
#ifndef CXX_BUILD
extern "C" {
@ -51,11 +52,11 @@ extern "C" {
enum
{
SHADER_PRESET_SAVE_GLOBAL = 0,
SHADER_PRESET_SAVE_CORE,
SHADER_PRESET_SAVE_PARENT,
SHADER_PRESET_SAVE_GAME,
SHADER_PRESET_SAVE_NORMAL
QT_SHADER_PRESET_GLOBAL = 0,
QT_SHADER_PRESET_CORE,
QT_SHADER_PRESET_PARENT,
QT_SHADER_PRESET_GAME,
QT_SHADER_PRESET_NORMAL
};
ShaderPass::ShaderPass(struct video_shader_pass *passToCopy) :
@ -688,76 +689,128 @@ void ShaderParamsDialog::onShaderSavePresetAsClicked()
pathArray = path.toUtf8();
pathData = pathArray.constData();
saveShaderPreset(pathData, SHADER_PRESET_SAVE_NORMAL);
operateShaderPreset(true, pathData, QT_SHADER_PRESET_NORMAL);
}
void ShaderParamsDialog::saveShaderPreset(const char *path, unsigned action_type)
/** save or remove shader preset */
void ShaderParamsDialog::operateShaderPreset(bool save, const char *path, unsigned action_type)
{
bool ret;
enum auto_shader_type preset_type;
switch (action_type)
{
case SHADER_PRESET_SAVE_GLOBAL:
case QT_SHADER_PRESET_GLOBAL:
preset_type = SHADER_PRESET_GLOBAL;
break;
case SHADER_PRESET_SAVE_CORE:
case QT_SHADER_PRESET_CORE:
preset_type = SHADER_PRESET_CORE;
break;
case QT_SHADER_PRESET_PARENT:
preset_type = SHADER_PRESET_PARENT;
break;
case SHADER_PRESET_SAVE_PARENT:
preset_type = SHADER_PRESET_PARENT;
break;
case SHADER_PRESET_SAVE_GAME:
case QT_SHADER_PRESET_GAME:
preset_type = SHADER_PRESET_GAME;
break;
case SHADER_PRESET_SAVE_NORMAL:
case QT_SHADER_PRESET_NORMAL:
break;
default:
return;
}
if (action_type == SHADER_PRESET_SAVE_NORMAL)
ret = menu_shader_manager_save_preset(menu_shader_get(), path, true);
else
ret = menu_shader_manager_save_auto_preset(menu_shader_get(), preset_type, true);
if (save)
{
if (action_type == QT_SHADER_PRESET_NORMAL)
ret = menu_shader_manager_save_preset(menu_shader_get(), path, true);
else
ret = menu_shader_manager_save_auto_preset(menu_shader_get(), preset_type, true);
if (ret)
runloop_msg_queue_push(
msg_hash_to_str(MSG_SHADER_PRESET_SAVED_SUCCESSFULLY),
1, 100, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT,
MESSAGE_QUEUE_CATEGORY_INFO
);
if (ret)
runloop_msg_queue_push(
msg_hash_to_str(MSG_SHADER_PRESET_SAVED_SUCCESSFULLY),
1, 100, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT,
MESSAGE_QUEUE_CATEGORY_INFO
);
else
runloop_msg_queue_push(
msg_hash_to_str(MSG_ERROR_SAVING_SHADER_PRESET),
1, 100, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT,
MESSAGE_QUEUE_CATEGORY_ERROR
);
}
else
runloop_msg_queue_push(
msg_hash_to_str(MSG_ERROR_SAVING_SHADER_PRESET),
1, 100, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT,
MESSAGE_QUEUE_CATEGORY_ERROR
);
{
if (action_type != QT_SHADER_PRESET_NORMAL &&
menu_shader_manager_remove_auto_preset(preset_type))
{
#ifdef HAVE_MENU
bool refresh = false;
#endif
runloop_msg_queue_push(
msg_hash_to_str(MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY),
1, 100, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT,
MESSAGE_QUEUE_CATEGORY_INFO
);
#ifdef HAVE_MENU
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
#endif
}
else
runloop_msg_queue_push(
msg_hash_to_str(MSG_ERROR_REMOVING_SHADER_PRESET),
1, 100, true, NULL,
MESSAGE_QUEUE_ICON_DEFAULT,
MESSAGE_QUEUE_CATEGORY_ERROR
);
}
}
void ShaderParamsDialog::onShaderSaveGlobalPresetClicked()
{
saveShaderPreset(NULL, SHADER_PRESET_GLOBAL);
operateShaderPreset(true, NULL, QT_SHADER_PRESET_GLOBAL);
}
void ShaderParamsDialog::onShaderSaveCorePresetClicked()
{
saveShaderPreset(NULL, SHADER_PRESET_CORE);
operateShaderPreset(true, NULL, QT_SHADER_PRESET_CORE);
}
void ShaderParamsDialog::onShaderSaveParentPresetClicked()
{
saveShaderPreset(NULL, SHADER_PRESET_PARENT);
operateShaderPreset(true, NULL, QT_SHADER_PRESET_PARENT);
}
void ShaderParamsDialog::onShaderSaveGamePresetClicked()
{
saveShaderPreset(NULL, SHADER_PRESET_GAME);
operateShaderPreset(true, NULL, QT_SHADER_PRESET_GAME);
}
void ShaderParamsDialog::onShaderClearAllPassesClicked()
void ShaderParamsDialog::onShaderRemoveGlobalPresetClicked()
{
operateShaderPreset(false, NULL, QT_SHADER_PRESET_GLOBAL);
}
void ShaderParamsDialog::onShaderRemoveCorePresetClicked()
{
operateShaderPreset(false, NULL, QT_SHADER_PRESET_CORE);
}
void ShaderParamsDialog::onShaderRemoveParentPresetClicked()
{
operateShaderPreset(false, NULL, QT_SHADER_PRESET_PARENT);
}
void ShaderParamsDialog::onShaderRemoveGamePresetClicked()
{
operateShaderPreset(false, NULL, QT_SHADER_PRESET_GAME);
}
void ShaderParamsDialog::onShaderRemoveAllPassesClicked()
{
struct video_shader *menu_shader = NULL;
struct video_shader *video_shader = NULL;
@ -776,19 +829,13 @@ void ShaderParamsDialog::onShaderClearAllPassesClicked()
void ShaderParamsDialog::onShaderRemovePassClicked()
{
int i;
QVariant passVariant;
QAction *action = qobject_cast<QAction*>(sender());
struct video_shader *menu_shader = NULL;
struct video_shader *video_shader = NULL;
int pass = 0;
bool ok = false;
getShaders(&menu_shader, &video_shader);
if (!menu_shader || menu_shader->passes == 0 || !action)
if (!action)
return;
passVariant = action->data();
if (!passVariant.isValid())
@ -799,6 +846,20 @@ void ShaderParamsDialog::onShaderRemovePassClicked()
if (!ok)
return;
onShaderRemovePass(pass);
}
void ShaderParamsDialog::onShaderRemovePass(int pass)
{
int i;
struct video_shader *menu_shader = NULL;
struct video_shader *video_shader = NULL;
getShaders(&menu_shader, &video_shader);
if (!menu_shader || menu_shader->passes == 0)
return;
if (pass < 0 || pass > static_cast<int>(menu_shader->passes))
return;
@ -818,6 +879,18 @@ void ShaderParamsDialog::onShaderApplyClicked()
command_event(CMD_EVENT_SHADERS_APPLY_CHANGES, NULL);
}
void ShaderParamsDialog::updateRemovePresetButtonsState()
{
if (removeGlobalPresetAction)
removeGlobalPresetAction->setEnabled(menu_shader_manager_auto_preset_exists(SHADER_PRESET_GLOBAL));
if (removeCorePresetAction)
removeCorePresetAction->setEnabled(menu_shader_manager_auto_preset_exists(SHADER_PRESET_CORE));
if (removeParentPresetAction)
removeParentPresetAction->setEnabled(menu_shader_manager_auto_preset_exists(SHADER_PRESET_PARENT));
if (removeGamePresetAction)
removeGamePresetAction->setEnabled(menu_shader_manager_auto_preset_exists(SHADER_PRESET_GAME));
}
void ShaderParamsDialog::reload()
{
buildLayout();
@ -828,11 +901,13 @@ void ShaderParamsDialog::buildLayout()
QPushButton *loadButton = NULL;
QPushButton *saveButton = NULL;
QPushButton *removeButton = NULL;
QPushButton *removePassButton = NULL;
QPushButton *applyButton = NULL;
QHBoxLayout *topButtonLayout = NULL;
QMenu *loadMenu = NULL;
QMenu *saveMenu = NULL;
QMenu *removeMenu = NULL;
QMenu *removePassMenu = NULL;
struct video_shader *menu_shader = NULL;
struct video_shader *video_shader = NULL;
struct video_shader *avail_shader = NULL;
@ -905,6 +980,7 @@ void ShaderParamsDialog::buildLayout()
loadButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_LOAD), this);
saveButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_SAVE), this);
removeButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_REMOVE), this);
removePassButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_REMOVE_PASSES), this);
applyButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_APPLY), this);
loadMenu = new QMenu(loadButton);
@ -923,6 +999,16 @@ void ShaderParamsDialog::buildLayout()
saveButton->setMenu(saveMenu);
removeMenu = new QMenu(removeButton);
removeGlobalPresetAction = removeMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL), this, SLOT(onShaderRemoveGlobalPresetClicked()));
removeCorePresetAction = removeMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_CORE), this, SLOT(onShaderRemoveCorePresetClicked()));
removeParentPresetAction = removeMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_PARENT), this, SLOT(onShaderRemoveParentPresetClicked()));
removeGamePresetAction = removeMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GAME), this, SLOT(onShaderRemoveGamePresetClicked()));
removeButton->setMenu(removeMenu);
connect(removeMenu, SIGNAL(aboutToShow()), this, SLOT(updateRemovePresetButtonsState()));
removePassMenu = new QMenu(removeButton);
/* When there are no passes, at least on first startup, it seems video_shader erroneously shows 1 pass, with an empty source file.
* So we use menu_shader instead for that.
@ -933,15 +1019,15 @@ void ShaderParamsDialog::buildLayout()
{
QFileInfo fileInfo(menu_shader->pass[i].source.path);
QString shaderBasename = fileInfo.completeBaseName();
QAction *action = removeMenu->addAction(shaderBasename, this, SLOT(onShaderRemovePassClicked()));
QAction *action = removePassMenu->addAction(shaderBasename, this, SLOT(onShaderRemovePassClicked()));
action->setData(i);
}
}
removeMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_SHADER_CLEAR_ALL_PASSES), this, SLOT(onShaderClearAllPassesClicked()));
removePassMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_SHADER_CLEAR_ALL_PASSES), this, SLOT(onShaderRemoveAllPassesClicked()));
removeButton->setMenu(removeMenu);
removePassButton->setMenu(removePassMenu);
connect(applyButton, SIGNAL(clicked()), this, SLOT(onShaderApplyClicked()));
@ -949,6 +1035,7 @@ void ShaderParamsDialog::buildLayout()
topButtonLayout->addWidget(loadButton);
topButtonLayout->addWidget(saveButton);
topButtonLayout->addWidget(removeButton);
topButtonLayout->addWidget(removePassButton);
topButtonLayout->addWidget(applyButton);
m_layout->addLayout(topButtonLayout);
@ -1337,6 +1424,7 @@ void ShaderParamsDialog::onShaderParamSliderValueChanged(int)
if (param)
{
newValue = MainWindow::lerp(0, 100, param->minimum, param->maximum, slider->value());
newValue = round(newValue / param->step) * param->step;
param->current = newValue;
}
}
@ -1357,6 +1445,7 @@ void ShaderParamsDialog::onShaderParamSliderValueChanged(int)
if (param)
{
newValue = MainWindow::lerp(0, 100, param->minimum, param->maximum, slider->value());
newValue = round(newValue / param->step) * param->step;
param->current = newValue;
}
}

View File

@ -54,6 +54,9 @@ private slots:
void onShaderPassMoveUpClicked();
void onShaderResetPass(int pass);
void onShaderResetAllPasses();
void onShaderRemovePass(int pass);
void onShaderRemoveAllPassesClicked();
void onShaderRemovePassClicked();
void onShaderResetParameter(QString parameter);
void onShaderLoadPresetClicked();
void onShaderAddPassClicked();
@ -62,19 +65,26 @@ private slots:
void onShaderSaveParentPresetClicked();
void onShaderSaveGamePresetClicked();
void onShaderSaveGlobalPresetClicked();
void onShaderClearAllPassesClicked();
void onShaderRemovePassClicked();
void onShaderRemoveCorePresetClicked();
void onShaderRemoveParentPresetClicked();
void onShaderRemoveGamePresetClicked();
void onShaderRemoveGlobalPresetClicked();
void onShaderApplyClicked();
void updateRemovePresetButtonsState();
void clearLayout();
void buildLayout();
private:
QString getFilterLabel(unsigned filter);
void addShaderParam(struct video_shader_parameter *param, QFormLayout *form);
void getShaders(struct video_shader **menu_shader, struct video_shader **video_shader);
void saveShaderPreset(const char *path, unsigned action_type);
void operateShaderPreset(bool save, const char *path, unsigned action_type);
QPointer<QVBoxLayout> m_layout;
QPointer<QScrollArea> m_scrollArea;
QAction *removeGlobalPresetAction;
QAction *removeCorePresetAction;
QAction *removeParentPresetAction;
QAction *removeGamePresetAction;
protected:
void closeEvent(QCloseEvent *event);
void resizeEvent(QResizeEvent *event);