mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Initialised all controller interfaces together on CFrame construction to fix the crash that would occur if the controller config were opened before a game was started.
This commit is contained in:
@ -361,8 +361,13 @@ void EmuThread()
|
||||
return;
|
||||
}
|
||||
|
||||
Keyboard::Initialize(s_window_handle);
|
||||
Pad::Initialize(s_window_handle);
|
||||
bool init_controllers = false;
|
||||
if (!g_controller_interface.IsInit())
|
||||
{
|
||||
Pad::Initialize(s_window_handle);
|
||||
Keyboard::Initialize(s_window_handle);
|
||||
init_controllers = true;
|
||||
}
|
||||
|
||||
// Load and Init Wiimotes - only if we are booting in Wii mode
|
||||
if (core_parameter.bWii)
|
||||
@ -481,8 +486,12 @@ void EmuThread()
|
||||
|
||||
Wiimote::Shutdown();
|
||||
|
||||
Keyboard::Shutdown();
|
||||
Pad::Shutdown();
|
||||
if (init_controllers)
|
||||
{
|
||||
Keyboard::Shutdown();
|
||||
Pad::Shutdown();
|
||||
init_controllers = false;
|
||||
}
|
||||
|
||||
g_video_backend->Shutdown();
|
||||
AudioCommon::ShutdownSoundStream();
|
||||
|
Reference in New Issue
Block a user