mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Settings: Remove ConfigChangedCallback on shutdown
This commit is contained in:
@ -59,7 +59,7 @@ Settings::Settings()
|
||||
});
|
||||
});
|
||||
|
||||
Config::AddConfigChangedCallback([this] {
|
||||
m_config_changed_callback_id = Config::AddConfigChangedCallback([this] {
|
||||
static std::atomic<bool> do_once{true};
|
||||
if (do_once.exchange(false))
|
||||
{
|
||||
@ -94,7 +94,10 @@ Settings::Settings()
|
||||
});
|
||||
}
|
||||
|
||||
Settings::~Settings() = default;
|
||||
Settings::~Settings()
|
||||
{
|
||||
Config::RemoveConfigChangedCallback(m_config_changed_callback_id);
|
||||
}
|
||||
|
||||
void Settings::UnregisterDevicesChangedCallback()
|
||||
{
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <QRadioButton>
|
||||
#include <QSettings>
|
||||
|
||||
#include "Common/Config/Config.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
@ -232,6 +233,7 @@ private:
|
||||
std::shared_ptr<NetPlay::NetPlayClient> m_client;
|
||||
std::shared_ptr<NetPlay::NetPlayServer> m_server;
|
||||
ControllerInterface::HotplugCallbackHandle m_hotplug_callback_handle;
|
||||
Config::ConfigChangedCallbackID m_config_changed_callback_id;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(Core::State);
|
||||
|
Reference in New Issue
Block a user