Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 08, 2012, 06:28:20 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Join our IRC channel: ##psp-programming on freenode
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: PSP_CTRL_HOLD  (Read 1429 times)
sels
Newbie
*

Karma: +1/-1
Offline Offline

Posts: 23
2057.08 points

View Inventory
Send Money to sels

View Profile
« on: December 15, 2009, 10:31:33 PM »

how do i use PSP_CTRL_HOLD function?
Logged


mowglisanu

C/C++ Developer
Hero Member
*

Karma: +36/-11
Offline Offline

Posts: 787
0.00 points

View Inventory
Send Money to mowglisanu


View Profile
« Reply #1 on: December 16, 2009, 07:59:11 PM »

PSP_CTRL_HOLD is not a function its a bit flag
Code:
if (pad.buttons & PSP_CTRL_HOLD){
   pspDebugScreenPrintf("Hold is on. Press X to continue...\n");
   do
       sceCtrlReadBufferPositive(&pad, 1);
   while(!(pad.buttons & PSP_CTRL_CROSS));
}
Logged

Check out my:
 Audio lib
 Pmf Viewer
sels
Newbie
*

Karma: +1/-1
Offline Offline

Posts: 23
2057.08 points

View Inventory
Send Money to sels

View Profile
« Reply #2 on: December 16, 2009, 10:25:11 PM »

so basically, its not a press and hold the button? is there any function that enables me to press and hold a button and , lets say, send data, but if the button is released, the data will stop sending immediately?
Logged
stinkee2
I thought the most important rule was "Why do today what you can put off 'till tomorrow"
Jr. Member
**

Karma: +5/-0
Offline Offline

Posts: 62
663.93 points

View Inventory
Send Money to stinkee2
Im so thirsty I could eat a house - Stinkee2


View Profile
« Reply #3 on: December 16, 2009, 10:26:58 PM »

you could make one? its easy. If you need help, Id be glad to help

If you need help I would need to ask a question:

Do you know how to use classes?
« Last Edit: December 16, 2009, 10:29:40 PM by stinkee2 » Logged

Dumping... 0.000001%, Speed: 1 byte/h.
An Abort of this application will corrupt your BIOS,Void your warranty, and Render your computer useless.
Please wait...
mowglisanu

C/C++ Developer
Hero Member
*

Karma: +36/-11
Offline Offline

Posts: 787
0.00 points

View Inventory
Send Money to mowglisanu


View Profile
« Reply #4 on: December 17, 2009, 10:41:39 AM »

>so basically, its not a press and hold the button? is there any function that enables me to press and hold a button

you detect a press and hold?

Code:
if (pad.buttons & PSP_CTRL_CROSS){
   if (!sendingData){
      startSendingData();
      sendingData = true;
   }
}
else{
   if (sendingData){
      stopSendingData();
      sendingData = false;
   }
}
Logged

Check out my:
 Audio lib
 Pmf Viewer
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.092 seconds with 28 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com