mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
project: Apply clang-format manually again
This commit is contained in:
parent
b34c880f88
commit
f8e685cf42
6 changed files with 27 additions and 38 deletions
|
@ -376,7 +376,9 @@ bool filter::CustomShader::Instance::apply_special_parameters(uint32_t, uint32_t
|
|||
.set_float2(float_t(imageTexture->get_width()), float_t(imageTexture->get_height()));
|
||||
}
|
||||
if (m_shader.effect->has_parameter("Image_SizeI" /*, gs::effect_parameter::type::Integer2*/)) {
|
||||
m_shader.effect->get_parameter("Image_SizeI").set_int2(static_cast<int32_t>(imageTexture->get_width()), static_cast<int32_t>(imageTexture->get_height()));
|
||||
m_shader.effect->get_parameter("Image_SizeI")
|
||||
.set_int2(static_cast<int32_t>(imageTexture->get_width()),
|
||||
static_cast<int32_t>(imageTexture->get_height()));
|
||||
}
|
||||
if (m_shader.effect->has_parameter("Image_Texel", gs::effect_parameter::type::Float2)) {
|
||||
m_shader.effect->get_parameter("Image_Texel")
|
||||
|
|
|
@ -482,7 +482,8 @@ void filter::sdf_effects::sdf_effects_instance::update(obs_data_t* data)
|
|||
{
|
||||
{
|
||||
this->m_outer_shadow =
|
||||
obs_data_get_bool(data, P_SHADOW_OUTER) && (obs_data_get_double(data, P_SHADOW_OUTER_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
obs_data_get_bool(data, P_SHADOW_OUTER)
|
||||
&& (obs_data_get_double(data, P_SHADOW_OUTER_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
{
|
||||
union {
|
||||
uint32_t color;
|
||||
|
@ -505,7 +506,8 @@ void filter::sdf_effects::sdf_effects_instance::update(obs_data_t* data)
|
|||
|
||||
{
|
||||
this->m_inner_shadow =
|
||||
obs_data_get_bool(data, P_SHADOW_INNER) && (obs_data_get_double(data, P_SHADOW_INNER_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
obs_data_get_bool(data, P_SHADOW_INNER)
|
||||
&& (obs_data_get_double(data, P_SHADOW_INNER_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
{
|
||||
union {
|
||||
uint32_t color;
|
||||
|
@ -528,7 +530,8 @@ void filter::sdf_effects::sdf_effects_instance::update(obs_data_t* data)
|
|||
|
||||
{
|
||||
this->m_outer_glow =
|
||||
obs_data_get_bool(data, P_GLOW_OUTER) && (obs_data_get_double(data, P_GLOW_OUTER_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
obs_data_get_bool(data, P_GLOW_OUTER)
|
||||
&& (obs_data_get_double(data, P_GLOW_OUTER_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
{
|
||||
union {
|
||||
uint32_t color;
|
||||
|
@ -553,7 +556,8 @@ void filter::sdf_effects::sdf_effects_instance::update(obs_data_t* data)
|
|||
|
||||
{
|
||||
this->m_inner_glow =
|
||||
obs_data_get_bool(data, P_GLOW_INNER) && (obs_data_get_double(data, P_GLOW_INNER_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
obs_data_get_bool(data, P_GLOW_INNER)
|
||||
&& (obs_data_get_double(data, P_GLOW_INNER_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
{
|
||||
union {
|
||||
uint32_t color;
|
||||
|
@ -577,8 +581,8 @@ void filter::sdf_effects::sdf_effects_instance::update(obs_data_t* data)
|
|||
}
|
||||
|
||||
{
|
||||
this->m_outline =
|
||||
obs_data_get_bool(data, P_OUTLINE) && (obs_data_get_double(data, P_OUTLINE_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
this->m_outline = obs_data_get_bool(data, P_OUTLINE)
|
||||
&& (obs_data_get_double(data, P_OUTLINE_ALPHA) >= std::numeric_limits<double_t>::epsilon());
|
||||
{
|
||||
union {
|
||||
uint32_t color;
|
||||
|
|
|
@ -71,7 +71,7 @@ void gfx::effect_source::fill_source_list(obs_property_t* prop)
|
|||
{
|
||||
obs_enum_sources(
|
||||
[](void* ptr, obs_source_t* src) {
|
||||
obs_property_t* pro = (obs_property_t*)ptr;
|
||||
obs_property_t* pro = (obs_property_t*)ptr;
|
||||
const char* sname = obs_source_get_name(src);
|
||||
obs_property_list_add_string(pro, sname, sname);
|
||||
return true;
|
||||
|
@ -159,7 +159,8 @@ void gfx::effect_source::get_properties(obs_properties_t* properties)
|
|||
obs_properties_add_bool(properties, prm.second->ui.names[0], prm.second->ui.descs[0]);
|
||||
} else if (prm.first.second >= gs::effect_parameter::type::Integer
|
||||
&& prm.first.second <= gs::effect_parameter::type::Integer4) {
|
||||
size_t cnt = static_cast<size_t>(prm.first.second) - static_cast<size_t>(gs::effect_parameter::type::Integer);
|
||||
size_t cnt =
|
||||
static_cast<size_t>(prm.first.second) - static_cast<size_t>(gs::effect_parameter::type::Integer);
|
||||
|
||||
for (size_t idx = 0; idx <= cnt; idx++) {
|
||||
obs_properties_add_int(properties, prm.second->ui.names[idx], prm.second->ui.descs[idx], INT_MIN,
|
||||
|
|
|
@ -77,8 +77,8 @@ gs::texture::texture(uint32_t width, uint32_t height, uint32_t depth, gs_color_f
|
|||
|
||||
if (mip_levels > 1 || ((texture_flags & flags::BuildMipMaps) == flags::BuildMipMaps)) {
|
||||
bool isPOT = (util::math::is_equal(pow(2, (int64_t)floor(log(width) / log(2))), width)
|
||||
&& util::math::is_equal(pow(2, (int64_t)floor(log(height) / log(2))), height)
|
||||
&& util::math::is_equal(pow(2, (int64_t)floor(log(depth) / log(2))), depth));
|
||||
&& util::math::is_equal(pow(2, (int64_t)floor(log(height) / log(2))), height)
|
||||
&& util::math::is_equal(pow(2, (int64_t)floor(log(depth) / log(2))), depth));
|
||||
if (!isPOT)
|
||||
throw std::logic_error("mip mapping requires power of two dimensions");
|
||||
}
|
||||
|
|
|
@ -427,32 +427,14 @@ obs::source::source()
|
|||
} \
|
||||
}); \
|
||||
}
|
||||
auto_signal_c(destroy)
|
||||
auto_signal_c(remove)
|
||||
auto_signal_c(save)
|
||||
auto_signal_c(load)
|
||||
auto_signal_c(activate)
|
||||
auto_signal_c(deactivate)
|
||||
auto_signal_c(show)
|
||||
auto_signal_c(hide)
|
||||
auto_signal_c(mute)
|
||||
auto_signal_c(push_to_mute_changed)
|
||||
auto_signal_c(push_to_mute_delay)
|
||||
auto_signal_c(push_to_talk_changed)
|
||||
auto_signal_c(push_to_talk_delay)
|
||||
auto_signal_c(enable)
|
||||
auto_signal_c(rename)
|
||||
auto_signal_c(volume)
|
||||
auto_signal_c(update_properties)
|
||||
auto_signal_c(update_flags)
|
||||
auto_signal_c(audio_sync)
|
||||
auto_signal_c(audio_mixers)
|
||||
auto_signal_c(filter_add)
|
||||
auto_signal_c(filter_remove)
|
||||
auto_signal_c(reorder_filters)
|
||||
auto_signal_c(transition_start)
|
||||
auto_signal_c(transition_video_stop)
|
||||
auto_signal_c(transition_stop)
|
||||
auto_signal_c(destroy) auto_signal_c(remove) auto_signal_c(save) auto_signal_c(load) auto_signal_c(activate)
|
||||
auto_signal_c(deactivate) auto_signal_c(show) auto_signal_c(hide) auto_signal_c(mute)
|
||||
auto_signal_c(push_to_mute_changed) auto_signal_c(push_to_mute_delay) auto_signal_c(push_to_talk_changed)
|
||||
auto_signal_c(push_to_talk_delay) auto_signal_c(enable) auto_signal_c(rename) auto_signal_c(volume)
|
||||
auto_signal_c(update_properties) auto_signal_c(update_flags) auto_signal_c(audio_sync)
|
||||
auto_signal_c(audio_mixers) auto_signal_c(filter_add) auto_signal_c(filter_remove)
|
||||
auto_signal_c(reorder_filters) auto_signal_c(transition_start)
|
||||
auto_signal_c(transition_video_stop) auto_signal_c(transition_stop)
|
||||
#undef auto_signal_c
|
||||
|
||||
// libOBS unfortunately does not use the event system for audio data callbacks, which is kind of odd as most other
|
||||
|
|
|
@ -150,7 +150,7 @@ bool source::mirror::mirror_factory::modified_properties(obs_properties_t* pr, o
|
|||
|
||||
if (obs_properties_get(pr, P_SCALING_BOUNDS) == p) {
|
||||
obs_bounds_type scaling_type = static_cast<obs_bounds_type>(obs_data_get_int(data, P_SCALING_BOUNDS));
|
||||
obs_property_t* p2 = obs_properties_get(pr, P_SCALING_BOUNDS);
|
||||
obs_property_t* p2 = obs_properties_get(pr, P_SCALING_BOUNDS);
|
||||
switch (scaling_type) {
|
||||
case obs_bounds_type::OBS_BOUNDS_STRETCH:
|
||||
obs_property_set_long_description(p2, P_TRANSLATE(P_DESC(P_SCALING_BOUNDS_STRETCH)));
|
||||
|
|
Loading…
Reference in a new issue