Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - // include psp stuff
 - #include <pspkernel.h>
 - #include <pspdebug.h>
 - #include <pspdisplay.h>
 - #include <pspctrl.h>
 - // include commons stuff
 - #include "../common/callback.h"
 - #include "../common/ui.h"
 - // configure PSP stuff
 - #define VERS 1
 - #define REVS 0
 - PSP_MODULE_INFO("UserInput", PSP_MODULE_USER, VERS, REVS);
 - PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
 - // make printing easier on us
 - #define printf pspDebugScreenPrintf
 - int main(int argc, char** argv)
 - {
 - // basic init
 - setupExitCallback();
 - pspDebugScreenInit();
 - sceCtrlSetSamplingCycle(0);
 - sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
 - int pad = 0;
 - while (isRunning()) {
 - pspDebugScreenSetXY(0, 0);
 - pollPad();
 - pad = getPad();
 - if(isKeyDown(pad, PSP_CTRL_CIRCLE))
 - printf("Circle is down!");
 - printf("%d,%d", getJX(), getJY());
 - sceDisplayWaitVblankStart();
 - }
 - sceKernelExitGame();
 - return 0;
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment