Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- All of this has been discovered by looking at the PS3 SDK libs and header files.
- This can be used on any game/homebrew.
- This doesn't use in-game addresses/offsets.
- This is LOCAL only.
- Credits:
- TrueBlueGaryOPA - PS3 3.70 SDK (Software Development Kit)
- */
- #include <cell/pad.h>
- #define PAD_LEFT (1 << 7)
- #define PAD_RIGHT (1 << 5)
- #define PAD_DOWN (1 << 6)
- #define PAD_UP (1 << 4)
- #define PAD_CROSS (1 << 14)
- #define PAD_SQUARE (1 << 15)
- #define PAD_CIRCLE (1 << 13)
- #define PAD_TRIANGLE (1 << 12)
- #define PAD_R1 (1 << 11)
- #define PAD_R2 (1 << 9)
- #define PAD_R3 (1 << 2)
- #define PAD_L1 (1 << 10)
- #define PAD_L2 (1 << 8)
- #define PAD_L3 (1 << 1)
- #define PAD_START (1 << 3)
- #define PAD_SELECT (1 << 0)
- CellPadData PadData;
- uint32_t GetKey(void)
- {
- uint32_t _padBuf;
- cellPadGetData(0, &PadData);
- _padBuf = PadData.button[3];
- _padBuf = (_padBuf << 8) + PadData.button[2];
- return _padBuf;
- }
- /*How to use: */
- if(GetKey()==(PAD_DOWN))
- {
- /*is pressing DOWN on the DPAD*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement