From 24d92e4b9255ce330a62e18e3d49312859ab625d Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 7 Nov 2019 22:08:21 +0100 Subject: [PATCH] utility: Managed OBS Graphics Context --- source/utility.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/utility.hpp b/source/utility.hpp index 07b028c..9358354 100644 --- a/source/utility.hpp +++ b/source/utility.hpp @@ -87,4 +87,15 @@ namespace obsffmpeg { { return obs_get_version() < MAKE_SEMANTIC_VERSION(24, 0, 0); } + + struct obs_graphics { + obs_graphics() + { + obs_enter_graphics(); + } + ~obs_graphics() + { + obs_leave_graphics(); + } + }; } // namespace obsffmpeg