summaryrefslogtreecommitdiffstats
path: root/src/core/frontend/scope_acquire_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/frontend/scope_acquire_context.cpp')
-rw-r--r--src/core/frontend/scope_acquire_context.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/frontend/scope_acquire_context.cpp b/src/core/frontend/scope_acquire_context.cpp
new file mode 100644
index 000000000..878c3157c
--- /dev/null
+++ b/src/core/frontend/scope_acquire_context.cpp
@@ -0,0 +1,18 @@
+// Copyright 2019 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/frontend/emu_window.h"
+#include "core/frontend/scope_acquire_context.h"
+
+namespace Core::Frontend {
+
+ScopeAcquireContext::ScopeAcquireContext(Core::Frontend::GraphicsContext& context)
+ : context{context} {
+ context.MakeCurrent();
+}
+ScopeAcquireContext::~ScopeAcquireContext() {
+ context.DoneCurrent();
+}
+
+} // namespace Core::Frontend