Detect Cancellation from OSK

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
arpaagent
Posts: 10
Joined: Thu Sep 06, 2007 12:50 pm

Detect Cancellation from OSK

Post by arpaagent »

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
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

The result member of the pspUtilityDialogCommon struct is set like you said for all the dialogs, not just the OSK.
Post Reply