ratalaika / angel-engine

Automatically exported from code.google.com/p/angel-engine
0 stars 0 forks source link

Controller reads should be reasonable when it's not connected #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the return values of controller functions are undefined if the
controller is not connected. There are, in fact, different responses on
each platform. 

While this can easily be gotten around by the client code checking if the
controller is connected before reading it (which is probably a smart move
anyway), we should ensure that reasonable defaults (no buttons down, both
thumbsticks at center) are returned when there is no physical controller
connected. 

Original issue reported on code.google.com by lieseg...@gmail.com on 13 Feb 2009 at 7:57

GoogleCodeExporter commented 9 years ago
I can take this if you like.

Original comment by RichBen...@gmail.com on 4 Mar 2009 at 9:10

GoogleCodeExporter commented 9 years ago
That'd be keen. I think on Windows we just need to make sure the memory gets 
zeroed
when the controller isn't connected -- right now it only gets zeroed when it's
*disconnected* in the middle of play. The mac side is a little wonkier, but I 
could
handle that. 

The more straightforward and cross-platform way would just be to have every 
relevant
function do a check to see if the controller is connected beforehand, but that 
seems
goofy to me for some reason. What do you think? 

Original comment by lieseg...@gmail.com on 4 Mar 2009 at 4:50

GoogleCodeExporter commented 9 years ago
I've got a change ready.   Maybe you can check the Apple side once I get it 
checked 
in?

Original comment by RichBen...@gmail.com on 6 Mar 2009 at 5:21

GoogleCodeExporter commented 9 years ago
Sure, go ahead and check it in, and I'll poke at the Mac side when I get a 
chance. 

Original comment by lieseg...@gmail.com on 6 Mar 2009 at 5:31

GoogleCodeExporter commented 9 years ago
At long last, this appears to be done. 

Original comment by lieseg...@gmail.com on 9 Jan 2013 at 4:06

GoogleCodeExporter commented 9 years ago
Looks like it fell off my radar.   :)

Original comment by RichBen...@gmail.com on 9 Jan 2013 at 6:24

GoogleCodeExporter commented 9 years ago
I still love you. 

Original comment by lieseg...@gmail.com on 9 Jan 2013 at 8:18