mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
HW: Don't be responsible for g_controller_interface
Currently, `g_controller_interface` is initialized and shut down by each of `GCKeyboard`, `GCPad`, `Wiimote`, and `HotkeyManager`. This 1) is weird conceptually, because it necessitates passing a pointer to the native window to each of those classes, which don't need it, and 2) can cause issues when controller backends are initialized or shutdown multiple times in succession.
This commit is contained in:
@ -23,11 +23,9 @@ InputConfig* GetConfig()
|
||||
void Shutdown()
|
||||
{
|
||||
s_config.ClearControllers();
|
||||
|
||||
g_controller_interface.Shutdown();
|
||||
}
|
||||
|
||||
void Initialize(void* const hwnd)
|
||||
void Initialize()
|
||||
{
|
||||
if (s_config.ControllersNeedToBeCreated())
|
||||
{
|
||||
@ -35,7 +33,6 @@ void Initialize(void* const hwnd)
|
||||
s_config.CreateController<GCKeyboard>(i);
|
||||
}
|
||||
|
||||
g_controller_interface.Initialize(hwnd);
|
||||
g_controller_interface.RegisterHotplugCallback(LoadConfig);
|
||||
|
||||
// Load the saved controller config
|
||||
|
Reference in New Issue
Block a user