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 

sceImposeGetHomePopup?

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



Joined: 28 Apr 2006
Posts: 190

PostPosted: Wed Oct 24, 2007 5:57 pm    Post subject: sceImposeGetHomePopup? Reply with quote

Hi! :)

I have a question. :)
Is there a way to know if the user is in the "Exit screen"?
I tried sceImposeGetHomePopup but it seems to return always 1.

What's the value returned by sceImposeGetHomePopup?

Many thanks.
Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
headness13



Joined: 21 Oct 2007
Posts: 2

PostPosted: Thu Oct 25, 2007 1:42 am    Post subject: Reply with quote

you can try

SceCtrlData pad;
sceCtrlReadBufferPositive(&pad, 1);
if (pad.Buttons & PSP_CTRL_HOME) ...

this way you know if the home button was pushed

but where did you find that function ? (sceImposeGetHomePopup) what sdk are you using ?!
Back to top
View user's profile Send private message
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Thu Oct 25, 2007 3:03 am    Post subject: Reply with quote

Hi! :)

Thanks for your reply.
I'm using the latest sdk, this function is here:
http://svn.ps2dev.org/filedetails.php?repname=psp&path=%2Ftrunk%2Fpspsdk%2Fsrc%2Fkernel%2Fpspimpose_driver.h&rev=0&sc=0

headness13 wrote:
you can try

SceCtrlData pad;
sceCtrlReadBufferPositive(&pad, 1);
if (pad.Buttons & PSP_CTRL_HOME) ...

In this way I cannot know when the user exits the screen (choosing "No" or pressing circle).
I need to know if the user is viewing the exit screen to avoid reading the buttons in my app.

Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Oct 25, 2007 3:59 am    Post subject: Reply with quote

It's probably not documented right. Given the way other Impose functions work, it more likely

Code:
int sceImposeGetHomePopup(int *value);


where the fn return is the status of the call, and value contains the Home Popup status if the fn return didn't indicate an error.
Back to top
View user's profile Send private message AIM Address
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Thu Oct 25, 2007 4:20 am    Post subject: Reply with quote

Hi, not sure what you want to do but you can maybe do something like this :

Code:

if(sceKernelFindModuleByName("sceLoadExec"))
{
        do();
}
Back to top
View user's profile Send private message
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Thu Oct 25, 2007 6:11 pm    Post subject: Reply with quote

Hi! :)

Many thanks for your help.
What I'm trying to do is stop reading button input in my program while the user is in the exit screen.

Cpasjuste wrote:

Code:

if(sceKernelFindModuleByName("sceLoadExec"))
{
        do();
}

I tried, but the sceLoadExec module seems to be always loaded (also when I'm not viewing the exit screen).
What should I check of this module to know if it is "active"?

EDIT:
I found how this functions work, but they don't help me with my "problem".

Code:
imposeSetHomePopup(0);

Disables the exit screen (pressing Home nothing happens)

Code:
imposeSetHomePopup(1);

Enables the exit screen (pressing Home the exit screen is invoked)

Code:
imposeGetHomePopup();

Returns the current value (0 or 1).

Still I don't know how to know if the user is viewing the exit screen. ;)

Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Fri Oct 26, 2007 2:14 am    Post subject: Reply with quote

You could try this :

Load psplink, load an homebrew, a game or anything with the exit callback and look in psplink wich module/thread is loaded when you are in the home screen. Then you could easly write a function to see if this module or thread is loaded.
Back to top
View user's profile Send private message
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Sat Oct 27, 2007 12:28 am    Post subject: Reply with quote

in your exit_callback code add a variable to hold the home
state and make that variable static to always retrieve its value
when home is called the callback is called and then this variable
is auto-set by you (use var ^1 to make easier) then this will always
give you an answer but YOU must keep track of status ...

but im sure you already can do this
_________________
10011011 00101010 11010111 10001001 10111010
Back to top
View user's profile Send private message
sakya



Joined: 28 Apr 2006
Posts: 190

PostPosted: Sat Oct 27, 2007 12:45 am    Post subject: Reply with quote

Hi! :)

Many thanks for your help. :)

dot_blank wrote:
in your exit_callback code add a variable to hold the home state and make that variable static

I have a static var to check the home status (and correctly exits from loops and close the app).
The exit_callback is called when I choose YES on the exit screen, I wanted to know if the user is just viewing the exit screen.

Ciaooo
Sakya
Back to top
View user's profile Send private message Visit poster's website
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Sat Oct 27, 2007 12:58 am    Post subject: Reply with quote

ah ok i see ...so then you will have to do a hybrid form
of using above and using the pad.buttons reading of HOME

or just patch sceKernelSleepThreadCB() when you create home thread
which is more work ...the solution to this is to disasm sceImpose..home
calls which would most likely bring you to disasm of interrupts
_________________
10011011 00101010 11010111 10001001 10111010
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