forums.PPSSPP.org
[DONE]How to get button status in code? - Printable Version

+- forums.PPSSPP.org (https://forums.ppsspp.org)
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: Development (/forumdisplay.php?fid=3)
+--- Thread: [DONE]How to get button status in code? (/showthread.php?tid=12254)



[DONE]How to get button status in code? - rnynoise - 06-25-2014 07:01 PM

Hi there, I'm sorry for asking such a simple question, because I'm a green hand to PPSSPP codes, and just begin from yestoday. =(
I'm working on the "0xD" cheat code now, you know there are some code depend on button state, I tried to find this by myself but failed...
Here are an example:
int buttonStatus; // ut32 buttonStatus? be used as a buffer to save button status
when TRIANGLE and CIRCLE is push, the value should be like this
buttonStatus = 0x00001000 + 0x00002000 // should be 0x00003000
I just want to know how to get the value of "0x00001000" and "0x00002000" or "0x00003000" in code?Angel
thx for you read, and do me a favor plz Heart


RE: [HELP]How to get button status in code? - barbanium - 06-25-2014 07:10 PM

Presently, joker commands on cheat codes don't work with PPSSPP (usually starts with "0xD"). Big Grin


RE: [HELP]How to get button status in code? - rnynoise - 06-25-2014 07:13 PM

To: barbanium
yes, you are right, that's what i'm trying to add to the code =).
To: [Unknow]
Thx very much!!

thx to [Unknow], I think it's finished now =)
uploaded, I'd like to hear if there are any problems.Wink


RE: [HELP]How to get button status in code? - [Unknown] - 06-25-2014 11:19 PM

Include Core/HLE/sceCtrl.h and use __CtrlPeekButtons().

-[Unknown]