Instead of closing the joysticks manually, use SDL_QuitSubSystem(SDL_INIT_JOYSTICK)
to quit the entire subsystem, which will also close all joysticks correctly.
The engine input destructor is replaced with a Shutdown
method so we can control when it is called, i.e. before calling SDL_Quit
, which forcefully quits all subsystems.
CJoystick::Close
is removed as we don't need to close joysticks manually anymore.