Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, const char *argv[]) {
- vita2d_init(); // iniciamos vita2d
- //vita2d_set_clear_color(RGB(0,0,0));// configuramos el color de limpiado
- //vita2d_start_drawing(); // Comienza el dibujado para uso de flip posterior
- // Prevent automatic CMA connection
- sceShellUtilLock(SCE_SHELL_UTIL_LOCK_TYPE_USB_CONNECTION);
- //buttons
- SceCtrlData pad;
- SceCtrlData oldpad;
- oldpad.buttons = 0;
- memset(&pad, 0, sizeof(pad));
- SceUdcdDeviceState state;
- sceUdcdGetDeviceState(&state);
- //if (state.cable & SCE_UDCD_STATUS_CABLE_CONNECTED) {
- initUsb();
- //}
- while(1) {
- sceCtrlPeekBufferPositive(0, &pad, 1);
- ///self reloading because why not
- if (pad.buttons != oldpad.buttons && pad.buttons & SCE_CTRL_START) {
- stopUsb(usbdevice_modid);
- }
- oldpad = pad;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement