diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-08-06 14:52:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-06 15:52:19 +0200 |
| commit | 640d1618519d42dd592f7af5e9984ad52eb8b820 (patch) | |
| tree | f44a5b58822eb60e7fd2dfc3e18af9bba0ab2cb0 /src/helpers/ScopeGuard.cpp | |
| parent | 0e86808e5912823f1c6bea1b6d5fcae297fc9f57 (diff) | |
renderer: Explicit sync fixes (#7151)
Enables explicit sync by default for most platforms
`misc:no_direct_scanout` -> `render:direct_scanout`
Diffstat (limited to 'src/helpers/ScopeGuard.cpp')
| -rw-r--r-- | src/helpers/ScopeGuard.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/helpers/ScopeGuard.cpp b/src/helpers/ScopeGuard.cpp new file mode 100644 index 00000000..319255cd --- /dev/null +++ b/src/helpers/ScopeGuard.cpp @@ -0,0 +1,10 @@ +#include "ScopeGuard.hpp" + +CScopeGuard::CScopeGuard(const std::function<void()>& fn_) : fn(fn_) { + ; +} + +CScopeGuard::~CScopeGuard() { + if (fn) + fn(); +} |
