mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-16 15:40:04 +00:00
f9ee0dc7ee
Removes a few unnecessary dependencies on core-related machinery, such as the core.h and memory.h, which reduces the amount of rebuilding necessary if those files change. This also uncovered some indirect dependencies within other source files. This also fixes those.
44 lines
1.4 KiB
C++
44 lines
1.4 KiB
C++
// Copyright 2015 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#include "common/logging/log.h"
|
|
#include "core/frontend/emu_window.h"
|
|
#include "core/settings.h"
|
|
#include "video_core/renderer_base.h"
|
|
|
|
namespace VideoCore {
|
|
|
|
RendererBase::RendererBase(Core::Frontend::EmuWindow& window) : render_window{window} {
|
|
RefreshBaseSettings();
|
|
}
|
|
|
|
RendererBase::~RendererBase() = default;
|
|
|
|
void RendererBase::RefreshBaseSettings() {
|
|
UpdateCurrentFramebufferLayout();
|
|
|
|
renderer_settings.use_framelimiter = Settings::values.use_frame_limit;
|
|
renderer_settings.set_background_color = true;
|
|
}
|
|
|
|
void RendererBase::UpdateCurrentFramebufferLayout() {
|
|
const Layout::FramebufferLayout& layout = render_window.GetFramebufferLayout();
|
|
|
|
render_window.UpdateCurrentFramebufferLayout(layout.width, layout.height);
|
|
}
|
|
|
|
void RendererBase::RequestScreenshot(void* data, std::function<void()> callback,
|
|
const Layout::FramebufferLayout& layout) {
|
|
if (renderer_settings.screenshot_requested) {
|
|
LOG_ERROR(Render, "A screenshot is already requested or in progress, ignoring the request");
|
|
return;
|
|
}
|
|
renderer_settings.screenshot_bits = data;
|
|
renderer_settings.screenshot_complete_callback = std::move(callback);
|
|
renderer_settings.screenshot_framebuffer_layout = layout;
|
|
renderer_settings.screenshot_requested = true;
|
|
}
|
|
|
|
} // namespace VideoCore
|