| View previous topic :: View next topic |
| Author |
Message |
fish
Joined: 08 Feb 2006 Posts: 25
|
Posted: Tue Feb 14, 2006 2:37 am Post subject: sceCtrlReadBufferPositive Vs sceCtrlPeekBufferPositive |
|
|
Can anyone explain the difference between sceCtrlReadBufferPositive and sceCtrlPeekBufferPositive?
Peek is undocumented in the PSPSDK docs.
I've not done any experiments other than using one in my game vs using the other I still get all the same information about the analogue nub and the buttons using both methods.
Read limits my update to 60Hz, regardless of anything else in the game, but Peek doesn't. Is Read waiting inside the function for the pad information to be updated by the system? or is there another reason that it limits limits the speed? |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Tue Feb 14, 2006 4:03 am Post subject: |
|
|
Read will always return a result. However, to do that, it might stall until new data is available (as you noticed). This stall seems to wait until the next vertical blank.
Peek might fail to return a result (hence the returncode), but it will never stall the execution to collect controller data. This is the preferred method if you want to be in control of what stalls your application. _________________ GE Dominator |
|
| Back to top |
|
 |
fish
Joined: 08 Feb 2006 Posts: 25
|
Posted: Tue Feb 14, 2006 4:31 am Post subject: |
|
|
| Ta much, that's what I figured but I wanted to be sure in case it messed up later:) |
|
| Back to top |
|
 |
|