| View previous topic :: View next topic |
| Author |
Message |
whizz
Joined: 19 Jul 2005 Posts: 3
|
Posted: Tue Jul 19, 2005 7:24 pm Post subject: performance cost of sceCtrlReadBufferPositive() ? |
|
|
Hi guys,
possibly a newbie question - but is there a severe performance cost to
a call to sceCtrlReadBufferPositive(&pad, 1); or to repeat calls to it?
I had an app going easily 60 fps but an extra call to this function slowed it down to 30 fps - even if I disabled a lot of other stuff. It's almost if it forced a wait of a full frame. Any ideas?
Thanks in advance. :) |
|
| Back to top |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
Posted: Tue Jul 19, 2005 8:29 pm Post subject: |
|
|
I found things started to freeze if I polled quicker than 1000usec.
Try to limit polling to 1/60th of a second (~16666usec). |
|
| Back to top |
|
 |
whizz
Joined: 19 Jul 2005 Posts: 3
|
Posted: Tue Jul 19, 2005 8:43 pm Post subject: |
|
|
Thanks for confirming this. Still wondering why, as it does seem that there's a delay comparable to forcing an extra 1/60th of a second wait (or waiting for next retrace).
Also slightly paranoid now that even the single call could take half a frame... but don't have profiling code in place to test this in any way. |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Tue Jul 19, 2005 11:00 pm Post subject: |
|
|
| whizz wrote: | Thanks for confirming this. Still wondering why, as it does seem that there's a delay comparable to forcing an extra 1/60th of a second wait (or waiting for next retrace).
Also slightly paranoid now that even the single call could take half a frame... but don't have profiling code in place to test this in any way. |
The problem is probably that the controls cannot be sampled quicker than 1/60th of a second, and if the function detects that it has been called with a shorter interval than this, it stalls until such time has passed. _________________ GE Dominator |
|
| Back to top |
|
 |
jpadams

Joined: 02 Jul 2005 Posts: 23 Location: Los Angeles
|
Posted: Wed Jul 20, 2005 2:30 am Post subject: |
|
|
try the peek version of the read ?
sceCtrlPeekBufferPositive
worked for me ( i never tested the analog stick with this though )
- j |
|
| Back to top |
|
 |
|