diff options
Diffstat (limited to 'src/core/frontend')
-rw-r--r-- | src/core/frontend/emu_window.h | 3 | ||||
-rw-r--r-- | src/core/frontend/framebuffer_layout.h | 1 | ||||
-rw-r--r-- | src/core/frontend/scope_acquire_context.cpp | 18 | ||||
-rw-r--r-- | src/core/frontend/scope_acquire_context.h (renamed from src/core/frontend/scope_acquire_window_context.h) | 10 | ||||
-rw-r--r-- | src/core/frontend/scope_acquire_window_context.cpp | 18 |
5 files changed, 24 insertions, 26 deletions
diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index 3376eedc5..5eb87fb63 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h @@ -26,9 +26,6 @@ public: /// Releases (dunno if this is the "right" word) the context from the caller thread virtual void DoneCurrent() = 0; - - /// Swap buffers to display the next frame - virtual void SwapBuffers() = 0; }; /** diff --git a/src/core/frontend/framebuffer_layout.h b/src/core/frontend/framebuffer_layout.h index 1d39c1faf..e9d0a40d3 100644 --- a/src/core/frontend/framebuffer_layout.h +++ b/src/core/frontend/framebuffer_layout.h @@ -29,6 +29,7 @@ enum class AspectRatio { struct FramebufferLayout { u32 width{ScreenUndocked::Width}; u32 height{ScreenUndocked::Height}; + bool is_srgb{}; Common::Rectangle<u32> screen; 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 diff --git a/src/core/frontend/scope_acquire_window_context.h b/src/core/frontend/scope_acquire_context.h index 2d9f6e825..7a65c0623 100644 --- a/src/core/frontend/scope_acquire_window_context.h +++ b/src/core/frontend/scope_acquire_context.h @@ -8,16 +8,16 @@ namespace Core::Frontend { -class EmuWindow; +class GraphicsContext; /// Helper class to acquire/release window context within a given scope -class ScopeAcquireWindowContext : NonCopyable { +class ScopeAcquireContext : NonCopyable { public: - explicit ScopeAcquireWindowContext(Core::Frontend::EmuWindow& window); - ~ScopeAcquireWindowContext(); + explicit ScopeAcquireContext(Core::Frontend::GraphicsContext& context); + ~ScopeAcquireContext(); private: - Core::Frontend::EmuWindow& emu_window; + Core::Frontend::GraphicsContext& context; }; } // namespace Core::Frontend diff --git a/src/core/frontend/scope_acquire_window_context.cpp b/src/core/frontend/scope_acquire_window_context.cpp deleted file mode 100644 index 3663dad17..000000000 --- a/src/core/frontend/scope_acquire_window_context.cpp +++ /dev/null @@ -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 |