mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 15:01:40 +00:00
Use case-insensitive string match for boolean settings
This commit is contained in:
parent
9f579d99f3
commit
4b090c2afb
2 changed files with 6 additions and 6 deletions
|
@ -1363,9 +1363,9 @@ fluid_handle_set(void* data, int ac, char** av, fluid_ostream_t out)
|
|||
if (fluid_settings_get_hints (handler->synth->settings, av[0], &hints) == FLUID_OK
|
||||
&& hints & FLUID_HINT_TOGGLED)
|
||||
{
|
||||
if (FLUID_STRCMP (av[1], "yes") == 0 || FLUID_STRCMP (av[1], "True") == 0
|
||||
|| FLUID_STRCMP (av[1], "TRUE") == 0 || FLUID_STRCMP (av[1], "true") == 0
|
||||
|| FLUID_STRCMP (av[1], "T") == 0)
|
||||
if (FLUID_STRCASECMP (av[1], "yes") == 0
|
||||
|| FLUID_STRCASECMP (av[1], "true") == 0
|
||||
|| FLUID_STRCASECMP (av[1], "t") == 0)
|
||||
ival = 1;
|
||||
else ival = atoi (av[1]);
|
||||
}
|
||||
|
|
|
@ -94,9 +94,9 @@ void process_o_cmd_line_option(fluid_settings_t* settings, char* optarg)
|
|||
if (fluid_settings_get_hints (settings, optarg, &hints) == FLUID_OK
|
||||
&& hints & FLUID_HINT_TOGGLED)
|
||||
{
|
||||
if (FLUID_STRCMP (val, "yes") == 0 || FLUID_STRCMP (val, "True") == 0
|
||||
|| FLUID_STRCMP (val, "TRUE") == 0 || FLUID_STRCMP (val, "true") == 0
|
||||
|| FLUID_STRCMP (val, "T") == 0)
|
||||
if (FLUID_STRCASECMP (val, "yes") == 0
|
||||
|| FLUID_STRCASECMP (val, "true") == 0
|
||||
|| FLUID_STRCASECMP (val, "t") == 0)
|
||||
ival = 1;
|
||||
else ival = atoi (val);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue