mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-14 15:55:07 +00:00
project: Apply clang-format
This commit is contained in:
parent
1482cb1d11
commit
7e5cbe18cf
20 changed files with 41 additions and 36 deletions
|
@ -166,8 +166,7 @@ void gfx::shader::float_parameter::properties(obs_properties_t* props, obs_data_
|
||||||
_param.get_default_value(defaults, _len);
|
_param.get_default_value(defaults, _len);
|
||||||
|
|
||||||
for (size_t len = 0; len < _len; len++) {
|
for (size_t len = 0; len < _len; len++) {
|
||||||
auto p =
|
auto p = obs_properties_add_float(grp, _key[len].c_str(), _name[len].c_str(), _min[len], _max[len], _step[len]);
|
||||||
obs_properties_add_float(grp, _key[len].c_str(), _name[len].c_str(), _min[len], _max[len], _step[len]);
|
|
||||||
obs_property_set_long_description(p, _desc.c_str());
|
obs_property_set_long_description(p, _desc.c_str());
|
||||||
obs_data_set_default_double(settings, _key[len].c_str(), static_cast<double_t>(defaults[len]));
|
obs_data_set_default_double(settings, _key[len].c_str(), static_cast<double_t>(defaults[len]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
#include "plugin.hpp"
|
#include "plugin.hpp"
|
||||||
|
|
||||||
// OBS
|
// OBS
|
||||||
|
|
|
@ -18,4 +18,3 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "obs-source-factory.hpp"
|
#include "obs-source-factory.hpp"
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#define STREAMEFFECTS_SOURCE_FACTORY_HPP
|
#define STREAMEFFECTS_SOURCE_FACTORY_HPP
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "plugin.hpp"
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include "plugin.hpp"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
static std::shared_ptr<obs::source_tracker> source_tracker_instance;
|
static std::shared_ptr<obs::source_tracker> source_tracker_instance;
|
||||||
|
|
||||||
void obs::source_tracker::source_create_handler(void* ptr, calldata_t* data) noexcept try {
|
void obs::source_tracker::source_create_handler(void* ptr, calldata_t* data) noexcept
|
||||||
|
try {
|
||||||
obs::source_tracker* self = reinterpret_cast<obs::source_tracker*>(ptr);
|
obs::source_tracker* self = reinterpret_cast<obs::source_tracker*>(ptr);
|
||||||
|
|
||||||
obs_source_t* target = nullptr;
|
obs_source_t* target = nullptr;
|
||||||
|
@ -49,7 +50,8 @@ void obs::source_tracker::source_create_handler(void* ptr, calldata_t* data) noe
|
||||||
P_LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
P_LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::source_tracker::source_destroy_handler(void* ptr, calldata_t* data) noexcept try {
|
void obs::source_tracker::source_destroy_handler(void* ptr, calldata_t* data) noexcept
|
||||||
|
try {
|
||||||
obs::source_tracker* self = reinterpret_cast<obs::source_tracker*>(ptr);
|
obs::source_tracker* self = reinterpret_cast<obs::source_tracker*>(ptr);
|
||||||
|
|
||||||
obs_source_t* target = nullptr;
|
obs_source_t* target = nullptr;
|
||||||
|
@ -76,7 +78,8 @@ void obs::source_tracker::source_destroy_handler(void* ptr, calldata_t* data) no
|
||||||
P_LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
P_LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
void obs::source_tracker::source_rename_handler(void* ptr, calldata_t* data) noexcept try {
|
void obs::source_tracker::source_rename_handler(void* ptr, calldata_t* data) noexcept
|
||||||
|
try {
|
||||||
obs::source_tracker* self = reinterpret_cast<obs::source_tracker*>(ptr);
|
obs::source_tracker* self = reinterpret_cast<obs::source_tracker*>(ptr);
|
||||||
|
|
||||||
obs_source_t* target = nullptr;
|
obs_source_t* target = nullptr;
|
||||||
|
|
|
@ -30,14 +30,16 @@ struct scs_searchdata {
|
||||||
|
|
||||||
static bool scs_contains(scs_searchdata& sd, obs_source_t* source);
|
static bool scs_contains(scs_searchdata& sd, obs_source_t* source);
|
||||||
|
|
||||||
static void scs_enum_active_cb(obs_source_t*, obs_source_t* child, void* searchdata) noexcept try {
|
static void scs_enum_active_cb(obs_source_t*, obs_source_t* child, void* searchdata) noexcept
|
||||||
|
try {
|
||||||
scs_searchdata& sd = reinterpret_cast<scs_searchdata&>(*reinterpret_cast<scs_searchdata*>(searchdata));
|
scs_searchdata& sd = reinterpret_cast<scs_searchdata&>(*reinterpret_cast<scs_searchdata*>(searchdata));
|
||||||
scs_contains(sd, child);
|
scs_contains(sd, child);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
P_LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
P_LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool scs_enum_items_cb(obs_scene_t*, obs_sceneitem_t* item, void* searchdata) noexcept try {
|
static bool scs_enum_items_cb(obs_scene_t*, obs_sceneitem_t* item, void* searchdata) noexcept
|
||||||
|
try {
|
||||||
scs_searchdata& sd = reinterpret_cast<scs_searchdata&>(*reinterpret_cast<scs_searchdata*>(searchdata));
|
scs_searchdata& sd = reinterpret_cast<scs_searchdata&>(*reinterpret_cast<scs_searchdata*>(searchdata));
|
||||||
obs_source_t* source = obs_sceneitem_get_source(item);
|
obs_source_t* source = obs_sceneitem_get_source(item);
|
||||||
return scs_contains(sd, source);
|
return scs_contains(sd, source);
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
#include "sources/source-mirror.hpp"
|
#include "sources/source-mirror.hpp"
|
||||||
#include "sources/source-shader.hpp"
|
#include "sources/source-shader.hpp"
|
||||||
|
|
||||||
MODULE_EXPORT bool obs_module_load(void) try {
|
MODULE_EXPORT bool obs_module_load(void)
|
||||||
|
try {
|
||||||
P_LOG_INFO("Loading Version %s", STREAMEFFECTS_VERSION_STRING);
|
P_LOG_INFO("Loading Version %s", STREAMEFFECTS_VERSION_STRING);
|
||||||
|
|
||||||
// Initialize Source Tracker
|
// Initialize Source Tracker
|
||||||
|
@ -55,7 +56,8 @@ MODULE_EXPORT bool obs_module_load(void) try {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE_EXPORT void obs_module_unload(void) try {
|
MODULE_EXPORT void obs_module_unload(void)
|
||||||
|
try {
|
||||||
P_LOG_INFO("Unloading Version %s", STREAMEFFECTS_VERSION_STRING);
|
P_LOG_INFO("Unloading Version %s", STREAMEFFECTS_VERSION_STRING);
|
||||||
|
|
||||||
// Clean up Sources
|
// Clean up Sources
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
#include "utility.hpp"
|
#include "utility.hpp"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include "plugin.hpp"
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include "plugin.hpp"
|
||||||
|
|
||||||
// OBS
|
// OBS
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <type_traits>
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <obs-config.h>
|
#include <obs-config.h>
|
||||||
|
@ -62,4 +62,4 @@ namespace util {
|
||||||
{
|
{
|
||||||
return obs_get_version() < MAKE_SEMANTIC_VERSION(24, 0, 0);
|
return obs_get_version() < MAKE_SEMANTIC_VERSION(24, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
} // namespace util
|
||||||
|
|
Loading…
Reference in a new issue