mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -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:
@ -24,11 +24,9 @@ void Shutdown()
|
||||
s_config.ClearControllers();
|
||||
|
||||
WiimoteReal::Stop();
|
||||
|
||||
g_controller_interface.Shutdown();
|
||||
}
|
||||
|
||||
void Initialize(void* const hwnd, InitializeMode init_mode)
|
||||
void Initialize(InitializeMode init_mode)
|
||||
{
|
||||
if (s_config.ControllersNeedToBeCreated())
|
||||
{
|
||||
@ -36,7 +34,6 @@ void Initialize(void* const hwnd, InitializeMode init_mode)
|
||||
s_config.CreateController<WiimoteEmu::Wiimote>(i);
|
||||
}
|
||||
|
||||
g_controller_interface.Initialize(hwnd);
|
||||
g_controller_interface.RegisterHotplugCallback(LoadConfig);
|
||||
|
||||
s_config.LoadConfig(false);
|
||||
|
Reference in New Issue
Block a user