diff options
author | zhupengfei <zhupengfei321@sina.cn> | 2018-08-31 08:16:16 +0200 |
---|---|---|
committer | fearlessTobi <thm.frey@gmail.com> | 2018-12-18 22:54:41 +0100 |
commit | a2be49305d8c5c66cfa2ec2060688013cf3729b9 (patch) | |
tree | 2a2e38805ae8af0718628682d7e911ccb253fc16 /src/video_core/renderer_base.h | |
parent | Merge pull request #1868 from lioncash/config (diff) | |
download | yuzu-a2be49305d8c5c66cfa2ec2060688013cf3729b9.tar yuzu-a2be49305d8c5c66cfa2ec2060688013cf3729b9.tar.gz yuzu-a2be49305d8c5c66cfa2ec2060688013cf3729b9.tar.bz2 yuzu-a2be49305d8c5c66cfa2ec2060688013cf3729b9.tar.lz yuzu-a2be49305d8c5c66cfa2ec2060688013cf3729b9.tar.xz yuzu-a2be49305d8c5c66cfa2ec2060688013cf3729b9.tar.zst yuzu-a2be49305d8c5c66cfa2ec2060688013cf3729b9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_base.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index 669e26e15..1d54c3723 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -9,6 +9,7 @@ #include <optional> #include "common/common_types.h" +#include "core/frontend/emu_window.h" #include "video_core/gpu.h" #include "video_core/rasterizer_interface.h" @@ -21,6 +22,12 @@ namespace VideoCore { struct RendererSettings { std::atomic_bool use_framelimiter{false}; std::atomic_bool set_background_color{false}; + + // Screenshot + std::atomic<bool> screenshot_requested{false}; + void* screenshot_bits; + std::function<void()> screenshot_complete_callback; + Layout::FramebufferLayout screenshot_framebuffer_layout; }; class RendererBase : NonCopyable { @@ -57,9 +64,29 @@ public: return *rasterizer; } + Core::Frontend::EmuWindow& GetRenderWindow() { + return render_window; + } + + const Core::Frontend::EmuWindow& GetRenderWindow() const { + return render_window; + } + + RendererSettings& Settings() { + return renderer_settings; + } + + const RendererSettings& Settings() const { + return renderer_settings; + } + /// Refreshes the settings common to all renderers void RefreshBaseSettings(); + /// Request a screenshot of the next frame + void RequestScreenshot(void* data, std::function<void()> callback, + const Layout::FramebufferLayout& layout); + protected: Core::Frontend::EmuWindow& render_window; ///< Reference to the render window handle. std::unique_ptr<RasterizerInterface> rasterizer; |