mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
Cleanups
This commit is contained in:
parent
ce9469cb98
commit
023bb20b91
@ -66,13 +66,13 @@ void settings_list_current_add_flags(
|
|||||||
rarch_setting_info_t *list_info,
|
rarch_setting_info_t *list_info,
|
||||||
unsigned values)
|
unsigned values)
|
||||||
{
|
{
|
||||||
|
unsigned index = list_info->index - 1;
|
||||||
(*list)[list_info->index - 1].flags |= values;
|
(*list)[index].flags |= values;
|
||||||
|
|
||||||
if (values & SD_FLAG_IS_DEFERRED)
|
if (values & SD_FLAG_IS_DEFERRED)
|
||||||
{
|
{
|
||||||
(*list)[list_info->index - 1].deferred_handler = (*list)[list_info->index - 1].change_handler;
|
(*list)[index].deferred_handler = (*list)[index].change_handler;
|
||||||
(*list)[list_info->index - 1].change_handler = null_write_handler;
|
(*list)[index].change_handler = null_write_handler;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,11 +82,13 @@ void 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)
|
||||||
{
|
{
|
||||||
(*list)[list_info->index - 1].min = min;
|
unsigned index = list_info->index - 1;
|
||||||
(*list)[list_info->index - 1].step = step;
|
|
||||||
(*list)[list_info->index - 1].max = max;
|
(*list)[index].min = min;
|
||||||
(*list)[list_info->index - 1].enforce_minrange = enforce_minrange_enable;
|
(*list)[index].step = step;
|
||||||
(*list)[list_info->index - 1].enforce_maxrange = enforce_maxrange_enable;
|
(*list)[index].max = max;
|
||||||
|
(*list)[index].enforce_minrange = enforce_minrange_enable;
|
||||||
|
(*list)[index].enforce_maxrange = enforce_maxrange_enable;
|
||||||
|
|
||||||
settings_list_current_add_flags(list, list_info, SD_FLAG_HAS_RANGE);
|
settings_list_current_add_flags(list, list_info, SD_FLAG_HAS_RANGE);
|
||||||
}
|
}
|
||||||
@ -96,7 +98,8 @@ void settings_list_current_add_values(
|
|||||||
rarch_setting_info_t *list_info,
|
rarch_setting_info_t *list_info,
|
||||||
const char *values)
|
const char *values)
|
||||||
{
|
{
|
||||||
(*list)[list_info->index -1].values = values;
|
unsigned index = list_info->index - 1;
|
||||||
|
(*list)[index].values = values;
|
||||||
}
|
}
|
||||||
|
|
||||||
void settings_list_current_add_cmd(
|
void settings_list_current_add_cmd(
|
||||||
@ -104,7 +107,8 @@ void settings_list_current_add_cmd(
|
|||||||
rarch_setting_info_t *list_info,
|
rarch_setting_info_t *list_info,
|
||||||
unsigned values)
|
unsigned values)
|
||||||
{
|
{
|
||||||
(*list)[list_info->index -1].cmd_trigger.idx = values;
|
unsigned index = list_info->index - 1;
|
||||||
|
(*list)[index].cmd_trigger.idx = values;
|
||||||
}
|
}
|
||||||
|
|
||||||
void settings_list_free(rarch_setting_t *list)
|
void settings_list_free(rarch_setting_t *list)
|
||||||
|
@ -15,11 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include "string_list.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "miscellaneous.h"
|
#include "miscellaneous.h"
|
||||||
#include "compat/strl.h"
|
#include "compat/strl.h"
|
||||||
#include "string_list.h"
|
|
||||||
#include "compat/posix_string.h"
|
#include "compat/posix_string.h"
|
||||||
|
|
||||||
void string_list_free(struct string_list *list)
|
void string_list_free(struct string_list *list)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user