From 19890b25ee5abbebbd7ec9ad4ace964278642062 Mon Sep 17 00:00:00 2001 From: Juliane Holzt Date: Mon, 13 Jul 2020 21:20:49 +0200 Subject: [PATCH] linux-v4l2: Fix case of variables to snake_case This commit fixes the case of two recently added attributes of the v4l2_data struct (in PR #2978). The new attributes were named "frameRateUnchanged" and "resolutionUnchanged", i.e. using CamelCase while all other attributes use snake_case. This change changes the name of the two attributes to snake_case. --- plugins/linux-v4l2/v4l2-input.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/linux-v4l2/v4l2-input.c b/plugins/linux-v4l2/v4l2-input.c index 47448c233..fe98a8bf8 100644 --- a/plugins/linux-v4l2/v4l2-input.c +++ b/plugins/linux-v4l2/v4l2-input.c @@ -81,8 +81,8 @@ struct v4l2_data { pthread_t thread; os_event_t *event; - bool framerateUnchanged; - bool resolutionUnchanged; + bool framerate_unchanged; + bool resolution_unchanged; int_fast32_t dev; int width; int height; @@ -976,28 +976,28 @@ static bool v4l2_settings_changed(struct v4l2_data *data, obs_data_t *settings) obs_data_get_int(settings, "dv_timing"); if (obs_data_get_int(settings, "resolution") == -1 && - !data->resolutionUnchanged) { - data->resolutionUnchanged = true; + !data->resolution_unchanged) { + data->resolution_unchanged = true; res |= true; } else if (obs_data_get_int(settings, "resolution") == -1 && - data->resolutionUnchanged) { + data->resolution_unchanged) { res |= false; } else { - data->resolutionUnchanged = false; + data->resolution_unchanged = false; res |= (data->resolution != obs_data_get_int(settings, "resolution")) && (obs_data_get_int(settings, "resolution") != -1); } if (obs_data_get_int(settings, "framerate") == -1 && - !data->framerateUnchanged) { - data->framerateUnchanged = true; + !data->framerate_unchanged) { + data->framerate_unchanged = true; res |= true; } else if (obs_data_get_int(settings, "framerate") == -1 && - data->framerateUnchanged) { + data->framerate_unchanged) { res |= false; } else { - data->framerateUnchanged = false; + data->framerate_unchanged = false; res |= (data->framerate != obs_data_get_int(settings, "framerate")) && (obs_data_get_int(settings, "framerate") != -1); @@ -1052,8 +1052,8 @@ static void *v4l2_create(obs_data_t *settings, obs_source_t *source) struct v4l2_data *data = bzalloc(sizeof(struct v4l2_data)); data->dev = -1; data->source = source; - data->resolutionUnchanged = false; - data->framerateUnchanged = false; + data->resolution_unchanged = false; + data->framerate_unchanged = false; /* Bitch about build problems ... */ #ifndef V4L2_CAP_DEVICE_CAPS