Cleanups
This commit is contained in:
parent
79f1166c6e
commit
330d8dc59e
|
@ -81,11 +81,11 @@ struct gfx_fbo_scale
|
||||||
enum gfx_scale_type type_y;
|
enum gfx_scale_type type_y;
|
||||||
float scale_x;
|
float scale_x;
|
||||||
float scale_y;
|
float scale_y;
|
||||||
unsigned abs_x;
|
|
||||||
unsigned abs_y;
|
|
||||||
bool fp_fbo;
|
bool fp_fbo;
|
||||||
bool srgb_fbo;
|
bool srgb_fbo;
|
||||||
bool valid;
|
bool valid;
|
||||||
|
unsigned abs_x;
|
||||||
|
unsigned abs_y;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct video_shader_parameter
|
struct video_shader_parameter
|
||||||
|
@ -113,19 +113,19 @@ struct video_shader_pass
|
||||||
|
|
||||||
char alias[64];
|
char alias[64];
|
||||||
struct gfx_fbo_scale fbo;
|
struct gfx_fbo_scale fbo;
|
||||||
unsigned filter;
|
|
||||||
enum gfx_wrap_type wrap;
|
enum gfx_wrap_type wrap;
|
||||||
unsigned frame_count_mod;
|
|
||||||
bool mipmap;
|
bool mipmap;
|
||||||
|
unsigned filter;
|
||||||
|
unsigned frame_count_mod;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct video_shader_lut
|
struct video_shader_lut
|
||||||
{
|
{
|
||||||
char id[64];
|
char id[64];
|
||||||
char path[PATH_MAX_LENGTH];
|
char path[PATH_MAX_LENGTH];
|
||||||
unsigned filter;
|
|
||||||
enum gfx_wrap_type wrap;
|
enum gfx_wrap_type wrap;
|
||||||
bool mipmap;
|
bool mipmap;
|
||||||
|
unsigned filter;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This is pretty big, shouldn't be put on the stack.
|
/* This is pretty big, shouldn't be put on the stack.
|
||||||
|
@ -134,27 +134,27 @@ struct video_shader
|
||||||
{
|
{
|
||||||
enum rarch_shader_type type;
|
enum rarch_shader_type type;
|
||||||
|
|
||||||
bool modern; /* Only used for XML shaders. */
|
|
||||||
char prefix[64];
|
char prefix[64];
|
||||||
|
char script_class[512];
|
||||||
unsigned passes;
|
|
||||||
struct video_shader_pass pass[GFX_MAX_SHADERS];
|
|
||||||
|
|
||||||
unsigned luts;
|
|
||||||
struct video_shader_lut lut[GFX_MAX_TEXTURES];
|
|
||||||
|
|
||||||
struct video_shader_parameter parameters[GFX_MAX_PARAMETERS];
|
|
||||||
unsigned num_parameters;
|
|
||||||
|
|
||||||
unsigned variables;
|
|
||||||
struct state_tracker_uniform_info variable[GFX_MAX_VARIABLES];
|
|
||||||
char script_path[PATH_MAX_LENGTH];
|
char script_path[PATH_MAX_LENGTH];
|
||||||
char *script; /* Dynamically allocated. Must be free'd. Only used by XML. */
|
char *script; /* Dynamically allocated. Must be free'd. Only used by XML. */
|
||||||
char script_class[512];
|
|
||||||
|
|
||||||
|
bool modern; /* Only used for XML shaders. */
|
||||||
|
|
||||||
|
unsigned passes;
|
||||||
|
unsigned luts;
|
||||||
|
unsigned num_parameters;
|
||||||
|
unsigned variables;
|
||||||
/* If < 0, no feedback pass is used. Otherwise,
|
/* If < 0, no feedback pass is used. Otherwise,
|
||||||
* the FBO after pass #N is passed a texture to next frame. */
|
* the FBO after pass #N is passed a texture to next frame. */
|
||||||
int feedback_pass;
|
int feedback_pass;
|
||||||
|
|
||||||
|
struct video_shader_pass pass[GFX_MAX_SHADERS];
|
||||||
|
|
||||||
|
struct video_shader_lut lut[GFX_MAX_TEXTURES];
|
||||||
|
|
||||||
|
struct video_shader_parameter parameters[GFX_MAX_PARAMETERS];
|
||||||
|
struct state_tracker_uniform_info variable[GFX_MAX_VARIABLES];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -44,24 +44,22 @@ enum state_ram_type
|
||||||
|
|
||||||
struct state_tracker_uniform_info
|
struct state_tracker_uniform_info
|
||||||
{
|
{
|
||||||
char id[64];
|
|
||||||
uint32_t addr;
|
|
||||||
enum state_tracker_type type;
|
enum state_tracker_type type;
|
||||||
enum state_ram_type ram_type;
|
enum state_ram_type ram_type;
|
||||||
|
char id[64];
|
||||||
uint16_t mask;
|
uint16_t mask;
|
||||||
uint16_t equal;
|
uint16_t equal;
|
||||||
|
uint32_t addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct state_tracker_info
|
struct state_tracker_info
|
||||||
{
|
{
|
||||||
const uint8_t *wram;
|
|
||||||
|
|
||||||
const struct state_tracker_uniform_info *info;
|
|
||||||
unsigned info_elem;
|
|
||||||
|
|
||||||
const char *script;
|
const char *script;
|
||||||
const char *script_class;
|
const char *script_class;
|
||||||
bool script_is_file;
|
bool script_is_file;
|
||||||
|
const uint8_t *wram;
|
||||||
|
unsigned info_elem;
|
||||||
|
const struct state_tracker_uniform_info *info;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct state_tracker_uniform
|
struct state_tracker_uniform
|
||||||
|
|
|
@ -227,7 +227,8 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
||||||
selection = MAX(MIN(selection, (menu_entries_get_size() - 1)), 0);
|
selection = MAX(MIN(selection, (menu_entries_get_size() - 1)), 0);
|
||||||
|
|
||||||
menu_entry_get(&entry, 0, selection, NULL, false);
|
menu_entry_get(&entry, 0, selection, NULL, false);
|
||||||
ret = menu_entry_action(&entry, (unsigned)selection, (enum menu_action)action);
|
ret = menu_entry_action(&entry,
|
||||||
|
(unsigned)selection, (enum menu_action)action);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
|
@ -344,31 +344,31 @@ typedef struct
|
||||||
char scratch_buf[PATH_MAX_LENGTH];
|
char scratch_buf[PATH_MAX_LENGTH];
|
||||||
char scratch2_buf[PATH_MAX_LENGTH];
|
char scratch2_buf[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
/* path to the currently loaded database playlist file. */
|
||||||
|
char db_playlist_file[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
uint64_t state;
|
uint64_t state;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
char msg[1024];
|
char msg[1024];
|
||||||
} menu_state;
|
} menu_state;
|
||||||
|
|
||||||
/* path to the currently loaded database playlist file. */
|
|
||||||
char db_playlist_file[PATH_MAX_LENGTH];
|
|
||||||
} menu_handle_t;
|
} menu_handle_t;
|
||||||
|
|
||||||
typedef struct menu_display_ctx_draw
|
typedef struct menu_display_ctx_draw
|
||||||
{
|
{
|
||||||
|
enum menu_display_prim_type prim_type;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
unsigned width;
|
|
||||||
unsigned height;
|
|
||||||
struct video_coords *coords;
|
|
||||||
void *matrix_data;
|
|
||||||
uintptr_t texture;
|
|
||||||
enum menu_display_prim_type prim_type;
|
|
||||||
float *color;
|
float *color;
|
||||||
const float *vertex;
|
const float *vertex;
|
||||||
const float *tex_coord;
|
const float *tex_coord;
|
||||||
|
unsigned width;
|
||||||
|
unsigned height;
|
||||||
|
uintptr_t texture;
|
||||||
size_t vertex_count;
|
size_t vertex_count;
|
||||||
|
struct video_coords *coords;
|
||||||
|
void *matrix_data;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned id;
|
unsigned id;
|
||||||
|
@ -380,12 +380,12 @@ typedef struct menu_display_ctx_draw
|
||||||
|
|
||||||
typedef struct menu_display_ctx_rotate_draw
|
typedef struct menu_display_ctx_rotate_draw
|
||||||
{
|
{
|
||||||
math_matrix_4x4 *matrix;
|
bool scale_enable;
|
||||||
float rotation;
|
float rotation;
|
||||||
float scale_x;
|
float scale_x;
|
||||||
float scale_y;
|
float scale_y;
|
||||||
float scale_z;
|
float scale_z;
|
||||||
bool scale_enable;
|
math_matrix_4x4 *matrix;
|
||||||
} menu_display_ctx_rotate_draw_t;
|
} menu_display_ctx_rotate_draw_t;
|
||||||
|
|
||||||
typedef struct menu_display_ctx_coord_draw
|
typedef struct menu_display_ctx_coord_draw
|
||||||
|
@ -536,21 +536,21 @@ typedef struct menu_ctx_pointer
|
||||||
unsigned x;
|
unsigned x;
|
||||||
unsigned y;
|
unsigned y;
|
||||||
unsigned ptr;
|
unsigned ptr;
|
||||||
menu_file_list_cbs_t *cbs;
|
|
||||||
menu_entry_t *entry;
|
|
||||||
unsigned action;
|
unsigned action;
|
||||||
int retcode;
|
int retcode;
|
||||||
|
menu_file_list_cbs_t *cbs;
|
||||||
|
menu_entry_t *entry;
|
||||||
} menu_ctx_pointer_t;
|
} menu_ctx_pointer_t;
|
||||||
|
|
||||||
typedef struct menu_ctx_bind
|
typedef struct menu_ctx_bind
|
||||||
{
|
{
|
||||||
menu_file_list_cbs_t *cbs;
|
|
||||||
const char *path;
|
const char *path;
|
||||||
const char *label;
|
const char *label;
|
||||||
unsigned type;
|
unsigned type;
|
||||||
size_t idx;
|
|
||||||
uint32_t label_hash;
|
uint32_t label_hash;
|
||||||
|
size_t idx;
|
||||||
int retcode;
|
int retcode;
|
||||||
|
menu_file_list_cbs_t *cbs;
|
||||||
} menu_ctx_bind_t;
|
} menu_ctx_bind_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -82,25 +82,59 @@
|
||||||
|
|
||||||
#include "../tasks/tasks_internal.h"
|
#include "../tasks/tasks_internal.h"
|
||||||
|
|
||||||
|
enum settings_list_type
|
||||||
|
{
|
||||||
|
SETTINGS_LIST_NONE = 0,
|
||||||
|
SETTINGS_LIST_MAIN_MENU,
|
||||||
|
SETTINGS_LIST_DRIVERS,
|
||||||
|
SETTINGS_LIST_CORE,
|
||||||
|
SETTINGS_LIST_CONFIGURATION,
|
||||||
|
SETTINGS_LIST_LOGGING,
|
||||||
|
SETTINGS_LIST_SAVING,
|
||||||
|
SETTINGS_LIST_REWIND,
|
||||||
|
SETTINGS_LIST_VIDEO,
|
||||||
|
SETTINGS_LIST_AUDIO,
|
||||||
|
SETTINGS_LIST_INPUT,
|
||||||
|
SETTINGS_LIST_INPUT_HOTKEY,
|
||||||
|
SETTINGS_LIST_RECORDING,
|
||||||
|
SETTINGS_LIST_FRAME_THROTTLING,
|
||||||
|
SETTINGS_LIST_FONT,
|
||||||
|
SETTINGS_LIST_OVERLAY,
|
||||||
|
SETTINGS_LIST_MENU,
|
||||||
|
SETTINGS_LIST_MENU_FILE_BROWSER,
|
||||||
|
SETTINGS_LIST_MULTIMEDIA,
|
||||||
|
SETTINGS_LIST_USER_INTERFACE,
|
||||||
|
SETTINGS_LIST_PLAYLIST,
|
||||||
|
SETTINGS_LIST_CHEEVOS,
|
||||||
|
SETTINGS_LIST_CORE_UPDATER,
|
||||||
|
SETTINGS_LIST_NETPLAY,
|
||||||
|
SETTINGS_LIST_LAKKA_SERVICES,
|
||||||
|
SETTINGS_LIST_USER,
|
||||||
|
SETTINGS_LIST_USER_ACCOUNTS,
|
||||||
|
SETTINGS_LIST_USER_ACCOUNTS_CHEEVOS,
|
||||||
|
SETTINGS_LIST_DIRECTORY,
|
||||||
|
SETTINGS_LIST_PRIVACY
|
||||||
|
};
|
||||||
|
|
||||||
struct bool_entry
|
struct bool_entry
|
||||||
{
|
{
|
||||||
bool *target;
|
|
||||||
enum msg_hash_enums name_enum_idx;
|
enum msg_hash_enums name_enum_idx;
|
||||||
enum msg_hash_enums SHORT_enum_idx;
|
enum msg_hash_enums SHORT_enum_idx;
|
||||||
bool default_value;
|
|
||||||
enum msg_hash_enums off_enum_idx;
|
enum msg_hash_enums off_enum_idx;
|
||||||
enum msg_hash_enums on_enum_idx;
|
enum msg_hash_enums on_enum_idx;
|
||||||
|
bool *target;
|
||||||
|
bool default_value;
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct string_options_entry
|
struct string_options_entry
|
||||||
{
|
{
|
||||||
char *target;
|
|
||||||
size_t len;
|
|
||||||
enum msg_hash_enums name_enum_idx;
|
enum msg_hash_enums name_enum_idx;
|
||||||
enum msg_hash_enums SHORT_enum_idx;
|
enum msg_hash_enums SHORT_enum_idx;
|
||||||
const char *default_value;
|
const char *default_value;
|
||||||
const char *values;
|
const char *values;
|
||||||
|
char *target;
|
||||||
|
size_t len;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_CHEEVOS
|
#ifdef HAVE_CHEEVOS
|
||||||
|
@ -597,7 +631,7 @@ void menu_settings_list_current_add_range(
|
||||||
float min, float max, float step,
|
float min, float max, float step,
|
||||||
bool enforce_minrange_enable, bool enforce_maxrange_enable)
|
bool enforce_minrange_enable, bool enforce_maxrange_enable)
|
||||||
{
|
{
|
||||||
unsigned idx = list_info->index - 1;
|
unsigned idx = list_info->index - 1;
|
||||||
|
|
||||||
(*list)[idx].min = min;
|
(*list)[idx].min = min;
|
||||||
(*list)[idx].step = step;
|
(*list)[idx].step = step;
|
||||||
|
@ -951,16 +985,14 @@ void setting_get_string_representation(void *data, char *s, size_t len)
|
||||||
**/
|
**/
|
||||||
static int setting_action_start_bind_device(void *data)
|
static int setting_action_start_bind_device(void *data)
|
||||||
{
|
{
|
||||||
uint32_t index_offset;
|
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
if (!setting || !settings)
|
if (!setting || !settings)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
index_offset = setting->index_offset;
|
configuration_set_uint(settings,
|
||||||
|
settings->uints.input_joypad_map[index_offset], setting->index_offset);
|
||||||
configuration_set_uint(settings, settings->uints.input_joypad_map[index_offset], index_offset);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1410,8 +1442,9 @@ static int setting_action_ok_bind_defaults(void *data, bool wraparound)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setting_get_string_representation_st_float_video_refresh_rate_auto(void *data,
|
static void
|
||||||
char *s, size_t len)
|
setting_get_string_representation_st_float_video_refresh_rate_auto(
|
||||||
|
void *data, char *s, size_t len)
|
||||||
{
|
{
|
||||||
double video_refresh_rate = 0.0;
|
double video_refresh_rate = 0.0;
|
||||||
double deviation = 0.0;
|
double deviation = 0.0;
|
||||||
|
@ -1811,7 +1844,7 @@ static void overlay_enable_toggle_change_handler(void *data)
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
static void systemd_service_toggle(const char *path, char *unit, bool enable)
|
static void systemd_service_toggle(const char *path, char *unit, bool enable)
|
||||||
{
|
{
|
||||||
int pid = fork();
|
int pid = fork();
|
||||||
char* args[] = {(char*)"systemctl", NULL, NULL, NULL};
|
char* args[] = {(char*)"systemctl", NULL, NULL, NULL};
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
|
@ -1835,6 +1868,7 @@ static void ssh_enable_toggle_change_handler(void *data)
|
||||||
{
|
{
|
||||||
bool enable = false;
|
bool enable = false;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
if (settings && settings->bools.ssh_enable)
|
if (settings && settings->bools.ssh_enable)
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -1846,6 +1880,7 @@ static void samba_enable_toggle_change_handler(void *data)
|
||||||
{
|
{
|
||||||
bool enable = false;
|
bool enable = false;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
if (settings && settings->bools.samba_enable)
|
if (settings && settings->bools.samba_enable)
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -1857,6 +1892,7 @@ static void bluetooth_enable_toggle_change_handler(void *data)
|
||||||
{
|
{
|
||||||
bool enable = false;
|
bool enable = false;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
if (settings && settings->bools.bluetooth_enable)
|
if (settings && settings->bools.bluetooth_enable)
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -1865,40 +1901,6 @@ static void bluetooth_enable_toggle_change_handler(void *data)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum settings_list_type
|
|
||||||
{
|
|
||||||
SETTINGS_LIST_NONE = 0,
|
|
||||||
SETTINGS_LIST_MAIN_MENU,
|
|
||||||
SETTINGS_LIST_DRIVERS,
|
|
||||||
SETTINGS_LIST_CORE,
|
|
||||||
SETTINGS_LIST_CONFIGURATION,
|
|
||||||
SETTINGS_LIST_LOGGING,
|
|
||||||
SETTINGS_LIST_SAVING,
|
|
||||||
SETTINGS_LIST_REWIND,
|
|
||||||
SETTINGS_LIST_VIDEO,
|
|
||||||
SETTINGS_LIST_AUDIO,
|
|
||||||
SETTINGS_LIST_INPUT,
|
|
||||||
SETTINGS_LIST_INPUT_HOTKEY,
|
|
||||||
SETTINGS_LIST_RECORDING,
|
|
||||||
SETTINGS_LIST_FRAME_THROTTLING,
|
|
||||||
SETTINGS_LIST_FONT,
|
|
||||||
SETTINGS_LIST_OVERLAY,
|
|
||||||
SETTINGS_LIST_MENU,
|
|
||||||
SETTINGS_LIST_MENU_FILE_BROWSER,
|
|
||||||
SETTINGS_LIST_MULTIMEDIA,
|
|
||||||
SETTINGS_LIST_USER_INTERFACE,
|
|
||||||
SETTINGS_LIST_PLAYLIST,
|
|
||||||
SETTINGS_LIST_CHEEVOS,
|
|
||||||
SETTINGS_LIST_CORE_UPDATER,
|
|
||||||
SETTINGS_LIST_NETPLAY,
|
|
||||||
SETTINGS_LIST_LAKKA_SERVICES,
|
|
||||||
SETTINGS_LIST_USER,
|
|
||||||
SETTINGS_LIST_USER_ACCOUNTS,
|
|
||||||
SETTINGS_LIST_USER_ACCOUNTS_CHEEVOS,
|
|
||||||
SETTINGS_LIST_DIRECTORY,
|
|
||||||
SETTINGS_LIST_PRIVACY
|
|
||||||
};
|
|
||||||
|
|
||||||
static bool setting_append_list_input_player_options(
|
static bool setting_append_list_input_player_options(
|
||||||
rarch_setting_t **list,
|
rarch_setting_t **list,
|
||||||
rarch_setting_info_t *list_info,
|
rarch_setting_info_t *list_info,
|
||||||
|
@ -2025,7 +2027,8 @@ static bool setting_append_list_input_player_options(
|
||||||
(*list)[list_info->index - 1].action_start = &setting_action_start_libretro_device_type;
|
(*list)[list_info->index - 1].action_start = &setting_action_start_libretro_device_type;
|
||||||
(*list)[list_info->index - 1].get_string_representation =
|
(*list)[list_info->index - 1].get_string_representation =
|
||||||
&setting_get_string_representation_uint_libretro_device;
|
&setting_get_string_representation_uint_libretro_device;
|
||||||
menu_settings_list_current_add_enum_idx(list, list_info, (enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_LIBRETRO_DEVICE + user));
|
menu_settings_list_current_add_enum_idx(list, list_info,
|
||||||
|
(enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_LIBRETRO_DEVICE + user));
|
||||||
|
|
||||||
CONFIG_UINT_ALT(
|
CONFIG_UINT_ALT(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
|
@ -2046,7 +2049,8 @@ static bool setting_append_list_input_player_options(
|
||||||
(*list)[list_info->index - 1].action_start = &setting_action_start_analog_dpad_mode;
|
(*list)[list_info->index - 1].action_start = &setting_action_start_analog_dpad_mode;
|
||||||
(*list)[list_info->index - 1].get_string_representation =
|
(*list)[list_info->index - 1].get_string_representation =
|
||||||
&setting_get_string_representation_uint_analog_dpad_mode;
|
&setting_get_string_representation_uint_analog_dpad_mode;
|
||||||
menu_settings_list_current_add_enum_idx(list, list_info, (enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE + user));
|
menu_settings_list_current_add_enum_idx(list, list_info,
|
||||||
|
(enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE + user));
|
||||||
|
|
||||||
CONFIG_ACTION_ALT(
|
CONFIG_ACTION_ALT(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
|
@ -2891,7 +2895,7 @@ static bool setting_append_list(
|
||||||
break;
|
break;
|
||||||
case SETTINGS_LIST_CONFIGURATION:
|
case SETTINGS_LIST_CONFIGURATION:
|
||||||
{
|
{
|
||||||
unsigned i;
|
uint8_t i;
|
||||||
struct bool_entry bool_entries[6];
|
struct bool_entry bool_entries[6];
|
||||||
START_GROUP(list, list_info, &group_info,
|
START_GROUP(list, list_info, &group_info,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS), parent_group);
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS), parent_group);
|
||||||
|
@ -3028,7 +3032,7 @@ static bool setting_append_list(
|
||||||
break;
|
break;
|
||||||
case SETTINGS_LIST_SAVING:
|
case SETTINGS_LIST_SAVING:
|
||||||
{
|
{
|
||||||
unsigned i;
|
uint8_t i;
|
||||||
struct bool_entry bool_entries[11];
|
struct bool_entry bool_entries[11];
|
||||||
|
|
||||||
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS), parent_group);
|
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS), parent_group);
|
||||||
|
@ -7083,20 +7087,20 @@ bool menu_setting_free(void *data)
|
||||||
if (values & 1)
|
if (values & 1)
|
||||||
switch (1 << n)
|
switch (1 << n)
|
||||||
{
|
{
|
||||||
case SD_FREE_FLAG_VALUES:
|
case SD_FREE_FLAG_VALUES:
|
||||||
free((void*)setting->values);
|
free((void*)setting->values);
|
||||||
setting->values = NULL;
|
setting->values = NULL;
|
||||||
break;
|
break;
|
||||||
case SD_FREE_FLAG_NAME:
|
case SD_FREE_FLAG_NAME:
|
||||||
free((void*)setting->name);
|
free((void*)setting->name);
|
||||||
setting->name = NULL;
|
setting->name = NULL;
|
||||||
break;
|
break;
|
||||||
case SD_FREE_FLAG_SHORT:
|
case SD_FREE_FLAG_SHORT:
|
||||||
free((void*)setting->short_description);
|
free((void*)setting->short_description);
|
||||||
setting->short_description = NULL;
|
setting->short_description = NULL;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(data);
|
free(data);
|
||||||
|
|
|
@ -306,13 +306,13 @@ bool menu_shader_manager_save_preset(
|
||||||
const char *basename, bool apply, bool fullpath)
|
const char *basename, bool apply, bool fullpath)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
|
bool ret = false;
|
||||||
char buffer[PATH_MAX_LENGTH];
|
char buffer[PATH_MAX_LENGTH];
|
||||||
char config_directory[PATH_MAX_LENGTH];
|
char config_directory[PATH_MAX_LENGTH];
|
||||||
char preset_path[PATH_MAX_LENGTH];
|
char preset_path[PATH_MAX_LENGTH];
|
||||||
unsigned d, type = RARCH_SHADER_NONE;
|
unsigned d, type = RARCH_SHADER_NONE;
|
||||||
const char *dirs[3] = {0};
|
const char *dirs[3] = {0};
|
||||||
config_file_t *conf = NULL;
|
config_file_t *conf = NULL;
|
||||||
bool ret = false;
|
|
||||||
struct video_shader *shader = menu_shader_get();
|
struct video_shader *shader = menu_shader_get();
|
||||||
|
|
||||||
buffer[0] = config_directory[0] = '\0';
|
buffer[0] = config_directory[0] = '\0';
|
||||||
|
@ -469,13 +469,15 @@ int menu_shader_manager_clear_num_passes(void)
|
||||||
int menu_shader_manager_clear_parameter(unsigned i)
|
int menu_shader_manager_clear_parameter(unsigned i)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
struct video_shader_parameter *param = menu_shader_manager_get_parameters(i);
|
struct video_shader_parameter *param =
|
||||||
|
menu_shader_manager_get_parameters(i);
|
||||||
|
|
||||||
if (!param)
|
if (!param)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
param->current = param->initial;
|
param->current = param->initial;
|
||||||
param->current = MIN(MAX(param->minimum, param->current), param->maximum);
|
param->current = MIN(MAX(param->minimum,
|
||||||
|
param->current), param->maximum);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -484,7 +486,8 @@ int menu_shader_manager_clear_parameter(unsigned i)
|
||||||
int menu_shader_manager_clear_pass_filter(unsigned i)
|
int menu_shader_manager_clear_pass_filter(unsigned i)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(i);
|
struct video_shader_pass *shader_pass =
|
||||||
|
menu_shader_manager_get_pass(i);
|
||||||
|
|
||||||
if (!shader_pass)
|
if (!shader_pass)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -500,7 +503,8 @@ int menu_shader_manager_clear_pass_filter(unsigned i)
|
||||||
void menu_shader_manager_clear_pass_scale(unsigned i)
|
void menu_shader_manager_clear_pass_scale(unsigned i)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(i);
|
struct video_shader_pass *shader_pass =
|
||||||
|
menu_shader_manager_get_pass(i);
|
||||||
|
|
||||||
if (!shader_pass)
|
if (!shader_pass)
|
||||||
return;
|
return;
|
||||||
|
@ -514,7 +518,8 @@ void menu_shader_manager_clear_pass_scale(unsigned i)
|
||||||
void menu_shader_manager_clear_pass_path(unsigned i)
|
void menu_shader_manager_clear_pass_path(unsigned i)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
struct video_shader_pass *shader_pass = menu_shader_manager_get_pass(i);
|
struct video_shader_pass *shader_pass =
|
||||||
|
menu_shader_manager_get_pass(i);
|
||||||
|
|
||||||
if (shader_pass)
|
if (shader_pass)
|
||||||
*shader_pass->source.path = '\0';
|
*shader_pass->source.path = '\0';
|
||||||
|
@ -535,7 +540,7 @@ unsigned menu_shader_manager_get_type(const void *data)
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
const struct video_shader *shader = (const struct video_shader*)data;
|
const struct video_shader *shader = (const struct video_shader*)data;
|
||||||
/* All shader types must be the same, or we cannot use it. */
|
/* All shader types must be the same, or we cannot use it. */
|
||||||
unsigned i = 0;
|
uint8_t i = 0;
|
||||||
|
|
||||||
if (!shader)
|
if (!shader)
|
||||||
return RARCH_SHADER_NONE;
|
return RARCH_SHADER_NONE;
|
||||||
|
|
Loading…
Reference in New Issue