clang-format: Apply formatting
Code submissions have continually suffered from formatting inconsistencies that constantly have to be addressed. Using clang-format simplifies this by making code formatting more consistent, and allows automation of the code formatting so that maintainers can focus more on the code itself instead of code formatting.
This commit is contained in:
@@ -29,13 +29,13 @@ static void slide_update(void *data, obs_data_t *settings)
|
||||
const char *dir = obs_data_get_string(settings, S_DIRECTION);
|
||||
|
||||
if (strcmp(dir, "right") == 0)
|
||||
slide->dir = (struct vec2){ -1.0f, 0.0f };
|
||||
slide->dir = (struct vec2){-1.0f, 0.0f};
|
||||
else if (strcmp(dir, "up") == 0)
|
||||
slide->dir = (struct vec2){ 0.0f, 1.0f };
|
||||
slide->dir = (struct vec2){0.0f, 1.0f};
|
||||
else if (strcmp(dir, "down") == 0)
|
||||
slide->dir = (struct vec2){ 0.0f, -1.0f };
|
||||
slide->dir = (struct vec2){0.0f, -1.0f};
|
||||
else /* left */
|
||||
slide->dir = (struct vec2){ 1.0f, 0.0f };
|
||||
slide->dir = (struct vec2){1.0f, 0.0f};
|
||||
}
|
||||
|
||||
void *slide_create(obs_data_t *settings, obs_source_t *source)
|
||||
@@ -123,12 +123,12 @@ static float mix_b(void *data, float t)
|
||||
}
|
||||
|
||||
bool slide_audio_render(void *data, uint64_t *ts_out,
|
||||
struct obs_source_audio_mix *audio, uint32_t mixers,
|
||||
size_t channels, size_t sample_rate)
|
||||
struct obs_source_audio_mix *audio, uint32_t mixers,
|
||||
size_t channels, size_t sample_rate)
|
||||
{
|
||||
struct slide_info *slide = data;
|
||||
return obs_transition_audio_render(slide->source, ts_out,
|
||||
audio, mixers, channels, sample_rate, mix_a, mix_b);
|
||||
return obs_transition_audio_render(slide->source, ts_out, audio, mixers,
|
||||
channels, sample_rate, mix_a, mix_b);
|
||||
}
|
||||
|
||||
static obs_properties_t *slide_properties(void *data)
|
||||
@@ -137,16 +137,16 @@ static obs_properties_t *slide_properties(void *data)
|
||||
obs_property_t *p;
|
||||
|
||||
p = obs_properties_add_list(ppts, S_DIRECTION,
|
||||
obs_module_text("Direction"), OBS_COMBO_TYPE_LIST,
|
||||
OBS_COMBO_FORMAT_STRING);
|
||||
obs_module_text("Direction"),
|
||||
OBS_COMBO_TYPE_LIST,
|
||||
OBS_COMBO_FORMAT_STRING);
|
||||
obs_property_list_add_string(p, obs_module_text("Direction.Left"),
|
||||
"left");
|
||||
"left");
|
||||
obs_property_list_add_string(p, obs_module_text("Direction.Right"),
|
||||
"right");
|
||||
obs_property_list_add_string(p, obs_module_text("Direction.Up"),
|
||||
"up");
|
||||
"right");
|
||||
obs_property_list_add_string(p, obs_module_text("Direction.Up"), "up");
|
||||
obs_property_list_add_string(p, obs_module_text("Direction.Down"),
|
||||
"down");
|
||||
"down");
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return ppts;
|
||||
@@ -161,5 +161,5 @@ struct obs_source_info slide_transition = {
|
||||
.update = slide_update,
|
||||
.video_render = slide_video_render,
|
||||
.audio_render = slide_audio_render,
|
||||
.get_properties = slide_properties
|
||||
.get_properties = slide_properties,
|
||||
};
|
||||
|
Reference in New Issue
Block a user