forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stupid question: Limiting Input?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Bytrix



Joined: 14 Sep 2005
Posts: 72
Location: England

PostPosted: Thu Jan 18, 2007 8:55 pm    Post subject: Stupid question: Limiting Input? Reply with quote

OK I've been working on a few apps and games for a month now. They're going well I have figured out almost everything I wanted to do with the GU and I've done some little apps and a few 3D demos.

The problem is I'm processing all my input in the main game loop, this means if my render stage (using a BSP renderer) renders more or less frames per second it also means I'm sampling the input irregularly.

So what's the best way to capture input at regular intervals. I have a few ideas but I'm wondering if there's a 'standard' way of doing it, and if someone could give me a little example code.

Thanks for any help :)

[EDIT] Well I found something which looks like it'll help. Still any other options or example code is welcomed:

http://forums.ps2dev.org/viewtopic.php?t=3983&highlight=sampling
Back to top
View user's profile Send private message Send e-mail
RCON



Joined: 03 Aug 2005
Posts: 16

PostPosted: Fri Jan 19, 2007 4:12 am    Post subject: Reply with quote

I think sceCtrlReadBufferPositive(&pad, 1) syncs your controller input to the VSync and sceCtrlPeekBufferPositive(&pad, 1) does not. That might also lock your framerate to 60fps max.

-Louie
Back to top
View user's profile Send private message Visit poster's website
Bytrix



Joined: 14 Sep 2005
Posts: 72
Location: England

PostPosted: Fri Jan 19, 2007 4:53 am    Post subject: Reply with quote

Yeah I just found that out too thanks. I think I will try and aim for using the vsync/60fps method as it's just easier (aslong as my fps doesn't drop below 60.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group