From 961a3a838d265211adf2ee6511ff0f32092a4d10 Mon Sep 17 00:00:00 2001 From: Pieter Hulshoff Date: Fri, 6 Jan 2017 14:53:41 +0100 Subject: [PATCH] RetroFE crashed on exit when a controller was connected. This is caused by the call to SDL_JoystickClose. It is unclear why this happens, so for now this code is disabled. --- RetroFE/Source/Control/UserInput.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/RetroFE/Source/Control/UserInput.cpp b/RetroFE/Source/Control/UserInput.cpp index e4de2e0..ed5a1f6 100644 --- a/RetroFE/Source/Control/UserInput.cpp +++ b/RetroFE/Source/Control/UserInput.cpp @@ -37,13 +37,14 @@ UserInput::UserInput(Configuration &c) UserInput::~UserInput() { - for(std::vector::iterator it = joysticks_.begin(); it != joysticks_.end(); it++) - { - if(*it) - { - SDL_JoystickClose(*it); - } - } +// This code causes an exception when a controller is attached; it's disabled to prevent crashes on exit. +// for(std::vector::iterator it = joysticks_.begin(); it != joysticks_.end(); it++) +// { +// if(*it) +// { +// SDL_JoystickClose(*it); +// } +// } } bool UserInput::initialize()