mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
ControllerInterface: replace Reinitialize with RefreshDevices
The SDL backend crashes when you close a joystick after SDL_Quit has been called. Some backends don't need to be shutdown and re-initialized everytime, we can just ask to enumerate devices again.
This commit is contained in:
@ -44,7 +44,7 @@ std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device)
|
||||
return result;
|
||||
}
|
||||
|
||||
void Init(HWND hwnd)
|
||||
void PopulateDevices(HWND hwnd)
|
||||
{
|
||||
IDirectInput8* idi8;
|
||||
if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8,
|
||||
|
@ -20,6 +20,6 @@ BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVO
|
||||
BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
|
||||
std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device);
|
||||
|
||||
void Init(HWND hwnd);
|
||||
void PopulateDevices(HWND hwnd);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user