summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-10-14 14:12:22 -0400
committerGitHub <noreply@github.com>2021-10-14 14:12:22 -0400
commitb02d662980a401057d2ff7c1522d47f9f6538d81 (patch)
tree2717ff56b111eb1adfcb712e14ad69f25ab76b68 /src/yuzu/bootmanager.cpp
parent894b483a0d619c3ceaa79fa0ff4cef6d37301f9c (diff)
parentb6894bfc5b86c2fae0b401f2cfc294a08994781d (diff)
Merge pull request #6774 from lat9nq/remove-global-yuzu
yuzu qt: Remove global system instances
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r--src/yuzu/bootmanager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 8b9e186b0..c75f5e1ee 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -42,7 +42,7 @@
#include "yuzu/bootmanager.h"
#include "yuzu/main.h"
-EmuThread::EmuThread() = default;
+EmuThread::EmuThread(Core::System& system_) : system{system_} {}
EmuThread::~EmuThread() = default;
@@ -51,7 +51,6 @@ void EmuThread::run() {
MicroProfileOnThreadCreate(name.c_str());
Common::SetCurrentThreadName(name.c_str());
- auto& system = Core::System::GetInstance();
auto& gpu = system.GPU();
auto stop_token = stop_source.get_token();
@@ -285,8 +284,10 @@ static Core::Frontend::EmuWindow::WindowSystemInfo GetWindowSystemInfo(QWindow*
}
GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
- std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_)
- : QWidget(parent), emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)} {
+ std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_,
+ Core::System& system_)
+ : QWidget(parent),
+ emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)}, system{system_} {
setWindowTitle(QStringLiteral("yuzu %1 | %2-%3")
.arg(QString::fromUtf8(Common::g_build_name),
QString::fromUtf8(Common::g_scm_branch),
@@ -629,8 +630,7 @@ void GRenderWindow::ReleaseRenderTarget() {
}
void GRenderWindow::CaptureScreenshot(u32 res_scale, const QString& screenshot_path) {
- auto& renderer = Core::System::GetInstance().Renderer();
-
+ VideoCore::RendererBase& renderer = system.Renderer();
if (res_scale == 0) {
res_scale = VideoCore::GetResolutionScaleFactor(renderer);
}