mirror of https://git.suyu.dev/suyu/suyu
core: frontend: Refactor scope_acquire_window_context to scope_acquire_context.
parent
2e16c23784
commit
667f026c95
@ -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
|
@ -1,18 +0,0 @@
|
|||||||
// 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_window_context.h"
|
|
||||||
|
|
||||||
namespace Core::Frontend {
|
|
||||||
|
|
||||||
ScopeAcquireWindowContext::ScopeAcquireWindowContext(Core::Frontend::EmuWindow& emu_window_)
|
|
||||||
: emu_window{emu_window_} {
|
|
||||||
emu_window.MakeCurrent();
|
|
||||||
}
|
|
||||||
ScopeAcquireWindowContext::~ScopeAcquireWindowContext() {
|
|
||||||
emu_window.DoneCurrent();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Core::Frontend
|
|
Loading…
Reference in New Issue