From 5c50a26b38a3aa77ec03f6fc364c5da8dcdf4fc1 Mon Sep 17 00:00:00 2001 From: Vitor Kiguchi Date: Mon, 3 Apr 2023 12:17:09 -0300 Subject: [PATCH] bootmanager: make main_context a unique_ptr --- src/citra_qt/bootmanager.cpp | 4 ++-- src/citra_qt/bootmanager.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 212b08b16..f9070da7e 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -386,7 +386,7 @@ static Frontend::EmuWindow::WindowSystemInfo GetWindowSystemInfo(QWindow* window return wsi; } -std::shared_ptr GRenderWindow::main_context; +std::unique_ptr GRenderWindow::main_context; GRenderWindow::GRenderWindow(QWidget* parent_, EmuThread* emu_thread, bool is_secondary_) : QWidget(parent_), EmuWindow(is_secondary_), emu_thread(emu_thread) { @@ -667,7 +667,7 @@ bool GRenderWindow::InitializeOpenGL() { child_widget->windowHandle()->create(); if (!main_context) { - main_context = std::make_shared(); + main_context = std::make_unique(); } auto child_context = CreateSharedContext(); diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h index cff01cbb9..f0019886d 100644 --- a/src/citra_qt/bootmanager.h +++ b/src/citra_qt/bootmanager.h @@ -192,7 +192,7 @@ private: /// Main context that will be shared with all other contexts that are requested. /// If this is used in a shared context setting, then this should not be used directly, but /// should instead be shared from - static std::shared_ptr main_context; + static std::unique_ptr main_context; /// Temporary storage of the screenshot taken QImage screenshot_image;