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 

Detect Cancellation from OSK

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



Joined: 06 Sep 2007
Posts: 10

PostPosted: Mon Mar 17, 2008 7:04 am    Post subject: Detect Cancellation from OSK Reply with quote

So I have been messing around with the built-in Osk using the sceUtility library in the sdk, and was trying to figure out how to detect a cancellation on text entry, which returns an empty string just like entering an empty string would. Since this part of the sdk isn't documented all that well, I just wanted to share with others how to detect it.

The fields are already there in the sceUtility structs that indicate whether the user cancelled or entered text, it just isn't stated what values are returned when. Here is what I found through some tests( see psputility.h and psputility_osk.h in the src/utility/ folder of the sdk ):

The "results" member of the pspUtilityDialogCommon struct ( "base" field of SceUtilityOskParams ), will be set to 0 upon successful text entry, and 1 if the user cancels the text entry.

Also, it seems that the "rc" field of the SceUtilityOskData struct will be set to 1 if the user cancels, and 2 after successful text entry.

Hope this helps anyone else that was wondering the same thing!
_________________
woo
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Mon Mar 17, 2008 10:43 pm    Post subject: Reply with quote

The result member of the pspUtilityDialogCommon struct is set like you said for all the dialogs, not just the OSK.
Back to top
View user's profile Send private message
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