mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 06:55:47 +00:00
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.
This commit is contained in:
parent
62b70f5226
commit
752b626714
4 changed files with 8 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue