mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +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);
|
||||
|
||||
for (size_t len = 0; len < _len; len++) {
|
||||
auto p =
|
||||
obs_properties_add_float(grp, _key[len].c_str(), _name[len].c_str(), _min[len], _max[len], _step[len]);
|
||||
auto p = 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_data_set_default_double(settings, _key[len].c_str(), static_cast<double_t>(defaults[len]));
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
namespace gs {
|
||||
class effect : public std::shared_ptr<gs_effect_t> {
|
||||
public:
|
||||
effect() {};
|
||||
effect(){};
|
||||
effect(std::string code, std::string name);
|
||||
effect(std::filesystem::path file);
|
||||
~effect();
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "plugin.hpp"
|
||||
|
||||
// OBS
|
||||
|
|
|
@ -18,4 +18,3 @@
|
|||
*/
|
||||
|
||||
#include "obs-source-factory.hpp"
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#define STREAMEFFECTS_SOURCE_FACTORY_HPP
|
||||
|
||||
#pragma once
|
||||
#include "plugin.hpp"
|
||||
#include <stdexcept>
|
||||
#include "plugin.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
|
||||
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_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__);
|
||||
}
|
||||
|
||||
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_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__);
|
||||
}
|
||||
|
||||
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_t* target = nullptr;
|
||||
|
|
|
@ -30,14 +30,16 @@ struct scs_searchdata {
|
|||
|
||||
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_contains(sd, child);
|
||||
} catch (...) {
|
||||
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));
|
||||
obs_source_t* source = obs_sceneitem_get_source(item);
|
||||
return scs_contains(sd, source);
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
#include "sources/source-mirror.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);
|
||||
|
||||
// Initialize Source Tracker
|
||||
|
@ -55,7 +56,8 @@ MODULE_EXPORT bool obs_module_load(void) try {
|
|||
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);
|
||||
|
||||
// Clean up Sources
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include "utility.hpp"
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include "plugin.hpp"
|
||||
#include <unordered_map>
|
||||
#include "plugin.hpp"
|
||||
|
||||
// OBS
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <type_traits>
|
||||
#include <cinttypes>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
|
||||
extern "C" {
|
||||
#include <obs-config.h>
|
||||
|
@ -62,4 +62,4 @@ namespace util {
|
|||
{
|
||||
return obs_get_version() < MAKE_SEMANTIC_VERSION(24, 0, 0);
|
||||
}
|
||||
}
|
||||
} // namespace util
|
||||
|
|
Loading…
Reference in a new issue