Fixed testcase where gamepad were used after the window had been destroyed