qt: unregister Settings' DevicesChanged callback during shutdown

fixes a crash on close
This commit is contained in:
Shawn Hoffman
2022-06-02 23:32:21 -07:00
parent f7f47d3cd0
commit 27dd2c4aa4
3 changed files with 14 additions and 2 deletions

View File

@ -12,6 +12,7 @@
#include "Core/Config/MainSettings.h"
#include "DiscIO/Enums.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
namespace Core
{
@ -44,6 +45,8 @@ public:
~Settings();
void UnregisterDevicesChangedCallback();
static Settings& Instance();
static QSettings& GetQSettings();
@ -199,10 +202,12 @@ signals:
void USBKeyboardConnectionChanged(bool connected);
private:
Settings();
bool m_batch = false;
std::shared_ptr<NetPlay::NetPlayClient> m_client;
std::shared_ptr<NetPlay::NetPlayServer> m_server;
Settings();
ControllerInterface::HotplugCallbackHandle m_hotplug_callback_handle;
};
Q_DECLARE_METATYPE(Core::State);