mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00: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:
parent
cebb4d84f2
commit
3e69d066f5
21 changed files with 79 additions and 25 deletions
|
@ -85,6 +85,12 @@ void Init()
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PopulateDevices()
|
||||
{
|
||||
if (!hXInput)
|
||||
return;
|
||||
|
||||
XINPUT_CAPABILITIES caps;
|
||||
for (int i = 0; i != 4; ++i)
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace ciface
|
|||
namespace XInput
|
||||
{
|
||||
void Init();
|
||||
void PopulateDevices();
|
||||
void DeInit();
|
||||
|
||||
class Device : public Core::Device
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue