libogc: Pads unusable if unplugged then plugged back in
libogc: Pads unusable if unplugged then plugged back in
I've tried calling PAD_Init again, but it doesn't seem to help.
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: libogc: Pads unusable if unplugged then plugged back in
We'll need a testcase I think, currently this works for me although I'm using current CVS & the next toolchain iteration.
Re: libogc: Pads unusable if unplugged then plugged back in
Thanks for looking into it. I had a quick look through CVS and it's possible that there were fixes:
http://devkitpro.cvs.sourceforge.net/de ... 19&r2=1.20
(Note new variable "connected" in PAD_ScanPads).
I don't use PAD_ScanPads though, I just call PAD_Read in Quake's input update function. It's entirely possible that I'm "doing it wrong".
http://devkitpro.cvs.sourceforge.net/de ... 19&r2=1.20
(Note new variable "connected" in PAD_ScanPads).
I don't use PAD_ScanPads though, I just call PAD_Read in Quake's input update function. It's entirely possible that I'm "doing it wrong".
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: libogc: Pads unusable if unplugged then plugged back in
Well, yeah. You should be using the scanpads function or at least providing the same functionality we have in there now. That's one of those lot check items commercial games have to deal with too - input failure after replugging pads is a big no no.
Re: libogc: Pads unusable if unplugged then plugged back in
Even though I was calling PAD_Read myself, I was checking for all the error codes and acting (as far as I could tell) accordingly.
I switched my code over to use PAD_ScanPads as the post-retrace callback, but still no dice. Once the pad is unplugged, the buttons are always zero. The code is a lot simpler though, so I'll probably keep it this way!
Do you know if this is something which is fixed in the CVS version and handled internally by PAD_ScanPads?
Edit: Sorry, just realised you confirmed that already.
Thanks for looking into these issues by the way.
I switched my code over to use PAD_ScanPads as the post-retrace callback, but still no dice. Once the pad is unplugged, the buttons are always zero. The code is a lot simpler though, so I'll probably keep it this way!
Do you know if this is something which is fixed in the CVS version and handled internally by PAD_ScanPads?
Edit: Sorry, just realised you confirmed that already.
Thanks for looking into these issues by the way.
Re: libogc: Pads unusable if unplugged then plugged back in
About PAD_ScanPad, we got warnings when we pass it at argument for the function "VIDEO_SetPostRetraceCallback"
the reason is in function type declaration:
typedef void (*VIRetraceCallback)(u32 retraceCnt);
u32 PAD_ScanPads();
it's not really important but maybe this should be fixed as PAD_ScanPads is, as you said, mostly used as PostRetraceCallback
the reason is in function type declaration:
typedef void (*VIRetraceCallback)(u32 retraceCnt);
u32 PAD_ScanPads();
it's not really important but maybe this should be fixed as PAD_ScanPads is, as you said, mostly used as PostRetraceCallback
Re: libogc: Pads unusable if unplugged then plugged back in
I mentioned that to WinterMute recently, who said the PAD_ScanPads call should be moved to your update/main loop and not done in the retrace callback any more.
Re: libogc: Pads unusable if unplugged then plugged back in
ok, using PostRetraceCallback seemed more optimized but why not
anyway, from my first tests with the new release,it seems the issue when unplugging pads has been fixed in libogc , which is good news
anyway, from my first tests with the new release,it seems the issue when unplugging pads has been fixed in libogc , which is good news
Re: libogc: Pads unusable if unplugged then plugged back in
Some precisions: it is fixed in GC mode but NOT in Wii mode !
remove the gamepad then reinsert it, it is not readable anymore
remove the gamepad then reinsert it, it is not readable anymore
Who is online
Users browsing this forum: No registered users and 1 guest