mirror of
https://github.com/libretro/libretro-prboom.git
synced 2024-11-23 07:59:39 +00:00
Cleanups
This commit is contained in:
parent
ac76753b0c
commit
1e4e73e858
53
deps/fluidlite/src/fluid_settings.c
vendored
53
deps/fluidlite/src/fluid_settings.c
vendored
@ -567,59 +567,6 @@ fluid_settings_getstr_default(fluid_settings_t* settings, const char* name)
|
||||
}
|
||||
}
|
||||
|
||||
int fluid_settings_add_option(fluid_settings_t* settings, const char* name, char* s)
|
||||
{
|
||||
int type;
|
||||
void* value;
|
||||
char* tokens[MAX_SETTINGS_TOKENS];
|
||||
char buf[MAX_SETTINGS_LABEL+1];
|
||||
int ntokens;
|
||||
|
||||
ntokens = fluid_settings_tokenize(name, buf, tokens);
|
||||
|
||||
if (fluid_settings_get(settings, tokens, ntokens, &value, &type)
|
||||
&& (type == FLUID_STR_TYPE)) {
|
||||
fluid_str_setting_t* setting = (fluid_str_setting_t*) value;
|
||||
char* copy = FLUID_STRDUP(s);
|
||||
setting->options = fluid_list_append(setting->options, copy);
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int fluid_settings_remove_option(fluid_settings_t* settings, const char* name, char* s)
|
||||
{
|
||||
int type;
|
||||
void* value;
|
||||
char* tokens[MAX_SETTINGS_TOKENS];
|
||||
char buf[MAX_SETTINGS_LABEL+1];
|
||||
int ntokens;
|
||||
|
||||
ntokens = fluid_settings_tokenize(name, buf, tokens);
|
||||
|
||||
if (fluid_settings_get(settings, tokens, ntokens, &value, &type)
|
||||
&& (type == FLUID_STR_TYPE)) {
|
||||
|
||||
fluid_str_setting_t* setting = (fluid_str_setting_t*) value;
|
||||
fluid_list_t* list = setting->options;
|
||||
|
||||
while (list) {
|
||||
char* option = (char*) fluid_list_get(list);
|
||||
if (FLUID_STRCMP(s, option) == 0) {
|
||||
FLUID_FREE (option);
|
||||
setting->options = fluid_list_remove_link(setting->options, list);
|
||||
return 1;
|
||||
}
|
||||
list = fluid_list_next(list);
|
||||
}
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int fluid_settings_setnum(fluid_settings_t* settings, const char* name, double val)
|
||||
{
|
||||
int type;
|
||||
|
9
deps/fluidlite/src/fluid_settings.h
vendored
9
deps/fluidlite/src/fluid_settings.h
vendored
@ -22,15 +22,6 @@
|
||||
#ifndef _FLUID_SETTINGS_H
|
||||
#define _FLUID_SETTINGS_H
|
||||
|
||||
|
||||
|
||||
/** returns 1 if the option was added, 0 otherwise */
|
||||
int fluid_settings_add_option(fluid_settings_t* settings, const char* name, char* s);
|
||||
|
||||
/** returns 1 if the option was added, 0 otherwise */
|
||||
int fluid_settings_remove_option(fluid_settings_t* settings, const char* name, char* s);
|
||||
|
||||
|
||||
typedef int (*fluid_num_update_t)(void* data, const char* name, double value);
|
||||
typedef int (*fluid_str_update_t)(void* data, const char* name, char* value);
|
||||
typedef int (*fluid_int_update_t)(void* data, const char* name, int value);
|
||||
|
Loading…
Reference in New Issue
Block a user