mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
ControllerInterface: Allow hotplug callbacks to be unregistered and don't reload the entire config from the ini file on hotplug, just update the control references. This should fix a crash on shutdown on Android.
This commit is contained in:
@ -9,6 +9,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
||||
namespace ControllerEmu
|
||||
{
|
||||
class EmulatedController;
|
||||
@ -40,7 +42,12 @@ public:
|
||||
std::string GetProfileName() const { return m_profile_name; }
|
||||
std::size_t GetControllerCount() const;
|
||||
|
||||
// These should be used after creating all controllers and before clearing them, respectively.
|
||||
void RegisterHotplugCallback();
|
||||
void UnregisterHotplugCallback();
|
||||
|
||||
private:
|
||||
ControllerInterface::HotplugCallbackHandle m_hotplug_callback_handle;
|
||||
std::vector<std::unique_ptr<ControllerEmu::EmulatedController>> m_controllers;
|
||||
const std::string m_ini_name;
|
||||
const std::string m_gui_name;
|
||||
|
Reference in New Issue
Block a user