OoliteProject / oolite

The main Oolite repository.
https://www.oolite.space
562 stars 73 forks source link

Game can become unplayable if joystick fails or is unplugged. #390

Open daniel-santos opened 3 years ago

daniel-santos commented 3 years ago

Hello!

I have a PS3 controller that's on the fritz -- it works great most of the time, but sometimes it just fails, usually when I'm pressing a button. When this happens I can unplug it and plug it back in a few seconds later and it will behave again, but whatever state the controller was in when it failed becomes permanent until I exit the program.

If I was pressing EMC, then I EMC until I'm out of power. If I was firing, then stays on, etc. I took a quick peek at the code and while I don't know objective c, it looks like the joystick is initialized when the game starts and that's it -- so that might be hard to change. If I start the game while the controller is not plugged in, then I cannot use the controller until I restart the program. Of course, in an ideal world, we could detect when these things come and go. and adapt to it.

HiranChaudhuri commented 1 year ago

Joystick behaviour has been worked on in https://github.com/OoliteProject/oolite/pull/403. Would you like to test again and let us know if the problem is resolved?