summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-29 00:44:27 -0400
committerLioncash <mathew1800@gmail.com>2020-08-29 00:58:11 -0400
commitbcd3c79eca66c911cf5eb9c593b63ab60e46d783 (patch)
tree2ee39ab0bdbaaae69bf82ce725cf06fb77cea171 /src/yuzu/bootmanager.h
parent57d9ef5a899dd32be7bae5aaeb53bc7cd2766a78 (diff)
yuzu/main: Amend lifetime issues with InputSubsystem
Due to the way Qt performs destruction of parent/child widgets, we need to make the lifetime of the input subsystem shared across the main window and the render window.
Diffstat (limited to 'src/yuzu/bootmanager.h')
-rw-r--r--src/yuzu/bootmanager.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index ecb3b8135..ca35cf831 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -6,6 +6,7 @@
#include <atomic>
#include <condition_variable>
+#include <memory>
#include <mutex>
#include <QImage>
@@ -126,7 +127,7 @@ class GRenderWindow : public QWidget, public Core::Frontend::EmuWindow {
public:
explicit GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
- InputCommon::InputSubsystem* input_subsystem_);
+ std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_);
~GRenderWindow() override;
// EmuWindow implementation.
@@ -188,7 +189,7 @@ private:
QStringList GetUnsupportedGLExtensions() const;
EmuThread* emu_thread;
- InputCommon::InputSubsystem* input_subsystem;
+ std::shared_ptr<InputCommon::InputSubsystem> input_subsystem;
// 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