1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-15 09:40:11 +00:00

Avoid some warnings by using return value for config_get_int

This commit is contained in:
twinaphex 2016-05-24 23:53:35 +02:00
parent 20aa9ed25a
commit 5a4ada4311
2 changed files with 16 additions and 6 deletions

@ -1739,6 +1739,7 @@ void video_driver_default_settings(void)
void video_driver_load_settings(config_file_t *conf)
{
bool tmp_bool = false;
global_t *global = global_get_ptr();
if (!conf)
@ -1746,10 +1747,14 @@ void video_driver_load_settings(config_file_t *conf)
CONFIG_GET_BOOL_BASE(conf, global,
console.screen.gamma_correction, "gamma_correction");
config_get_bool(conf, "flicker_filter_enable",
&global->console.flickerfilter_enable);
config_get_bool(conf, "soft_filter_enable",
&global->console.softfilter_enable);
if (config_get_bool(conf, "flicker_filter_enable",
&tmp_bool))
global->console.flickerfilter_enable = tmp_bool;
if (config_get_bool(conf, "soft_filter_enable",
&tmp_bool))
global->console.softfilter_enable = tmp_bool;
CONFIG_GET_INT_BASE(conf, global,
console.screen.soft_filter_index,

@ -72,6 +72,7 @@ static void input_autoconfigure_joypad_conf(config_file_t *conf,
static int input_try_autoconfigure_joypad_from_conf(config_file_t *conf,
autoconfig_params_t *params)
{
int tmp_int;
char ident[PATH_MAX_LENGTH] = {0};
char input_driver[PATH_MAX_LENGTH] = {0};
int input_vid = 0;
@ -83,8 +84,12 @@ static int input_try_autoconfigure_joypad_from_conf(config_file_t *conf,
config_get_array(conf, "input_device", ident, sizeof(ident));
config_get_array(conf, "input_driver", input_driver, sizeof(input_driver));
config_get_int (conf, "input_vendor_id", &input_vid);
config_get_int (conf, "input_product_id", &input_pid);
if (config_get_int (conf, "input_vendor_id", &tmp_int))
input_vid = tmp_int;
if (config_get_int (conf, "input_product_id", &tmp_int))
input_pid = tmp_int;
/* Check for VID/PID */
if ( (params->vid == input_vid)