mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Fixed an issue where buggy controller drivers could crash the application.
This commit is contained in:
parent
bd3ec2472e
commit
55316365d8
|
@ -129,6 +129,7 @@ Apart from all the above, a huge amount of work has gone into fixing bugs, refac
|
||||||
* Single-scraping a game, aborting and then re-scraping without leaving the metadata editor would sometimes lead to a crash
|
* Single-scraping a game, aborting and then re-scraping without leaving the metadata editor would sometimes lead to a crash
|
||||||
* Setting a really small font size in a theme would crash the application
|
* Setting a really small font size in a theme would crash the application
|
||||||
* Deleting the last custom collection could crash the application if the grouped "collections" system was set as the startup gamelist
|
* Deleting the last custom collection could crash the application if the grouped "collections" system was set as the startup gamelist
|
||||||
|
* Connecting a controller with buggy drivers could crash the application
|
||||||
* Setting an invalid UIMode value in the configuration file could crash the application
|
* Setting an invalid UIMode value in the configuration file could crash the application
|
||||||
* Setting an invalid scraper service value in the configuration file could crash the application
|
* Setting an invalid scraper service value in the configuration file could crash the application
|
||||||
* When scraping in interactive mode with "Auto-accept single game matches" enabled, the game name could not be refined if there were no games found
|
* When scraping in interactive mode with "Auto-accept single game matches" enabled, the game name could not be refined if there were no games found
|
||||||
|
|
|
@ -625,6 +625,12 @@ void InputManager::addControllerByDeviceIndex(Window* window, int deviceIndex)
|
||||||
{
|
{
|
||||||
// Open joystick and add it to our list.
|
// Open joystick and add it to our list.
|
||||||
SDL_GameController* controller = SDL_GameControllerOpen(deviceIndex);
|
SDL_GameController* controller = SDL_GameControllerOpen(deviceIndex);
|
||||||
|
|
||||||
|
if (controller == nullptr) {
|
||||||
|
LOG(LogError) << "Couldn't add controller with device index " << deviceIndex;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SDL_Joystick* joy = SDL_GameControllerGetJoystick(controller);
|
SDL_Joystick* joy = SDL_GameControllerGetJoystick(controller);
|
||||||
|
|
||||||
// Add it to our list so we can close it again later.
|
// Add it to our list so we can close it again later.
|
||||||
|
|
Loading…
Reference in a new issue