removing debugging statements or migrating them over to the build time debugging code
git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@107 c05e91a0-76c8-4ec0-b377-ef19ce7cc080
This commit is contained in:
committed by
virtuoussin13
parent
b4fb916596
commit
941eee3fdc
@ -49,7 +49,7 @@ void JoyPad::resetToDev(int dev ) {
|
|||||||
read_struct.events = POLLIN;
|
read_struct.events = POLLIN;
|
||||||
char buf[10];
|
char buf[10];
|
||||||
while(poll(&read_struct, 1, 5)!=0) {
|
while(poll(&read_struct, 1, 5)!=0) {
|
||||||
printf("reading junk data\n");
|
DEBUG("reading junk data\n");
|
||||||
read(joydev, buf, 10);
|
read(joydev, buf, 10);
|
||||||
}
|
}
|
||||||
setupJoyDeviceListener(dev);
|
setupJoyDeviceListener(dev);
|
||||||
@ -226,13 +226,13 @@ void JoyPad::jsevent( js_event msg ) {
|
|||||||
//otherwise, lets create us a fake event! Pass on the event to whichever
|
//otherwise, lets create us a fake event! Pass on the event to whichever
|
||||||
//Button or Axis was pressed and let them decide what to do with it.
|
//Button or Axis was pressed and let them decide what to do with it.
|
||||||
if (msg.type & JS_EVENT_AXIS) {
|
if (msg.type & JS_EVENT_AXIS) {
|
||||||
printf("DEBUG: passing on an axis event\n");
|
//printf("DEBUG: passing on an axis event\n");
|
||||||
printf("DEBUG: %d %d\n", msg.number, msg.value);
|
//printf("DEBUG: %d %d\n", msg.number, msg.value);
|
||||||
Axes[msg.number]->jsevent(msg.value);
|
Axes[msg.number]->jsevent(msg.value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("DEBUG: passing on a button event\n");
|
//printf("DEBUG: passing on a button event\n");
|
||||||
printf("DEBUG: %d %d\n", msg.number, msg.value);
|
//printf("DEBUG: %d %d\n", msg.number, msg.value);
|
||||||
Buttons[msg.number]->jsevent(msg.value);
|
Buttons[msg.number]->jsevent(msg.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,6 @@ void LayoutManager::trayClick() {
|
|||||||
void LayoutManager::trayMenu(QAction *menuItemAction) {
|
void LayoutManager::trayMenu(QAction *menuItemAction) {
|
||||||
//if they clicked on a Layout name, load it!
|
//if they clicked on a Layout name, load it!
|
||||||
//note that the other options are handled with their own special functions
|
//note that the other options are handled with their own special functions
|
||||||
printf("%s\n", qPrintable(menuItemAction->text()));
|
|
||||||
if (Popup->actions().indexOf(menuItemAction) > 1 && menuItemAction->text() != "Quit" &&
|
if (Popup->actions().indexOf(menuItemAction) > 1 && menuItemAction->text() != "Quit" &&
|
||||||
menuItemAction->text() != "Update lyaout list" &&
|
menuItemAction->text() != "Update lyaout list" &&
|
||||||
menuItemAction->text() != "Update joystick devices") {
|
menuItemAction->text() != "Update joystick devices") {
|
||||||
@ -353,7 +352,7 @@ void LayoutManager::updateJoyDevs() {
|
|||||||
read_struct.events = POLLIN;
|
read_struct.events = POLLIN;
|
||||||
char buf[10];
|
char buf[10];
|
||||||
while(poll(&read_struct, 1, 5)!=0) {
|
while(poll(&read_struct, 1, 5)!=0) {
|
||||||
printf("reading junk data\n");
|
DEBUG("reading junk data\n");
|
||||||
read(joydev, buf, 10);
|
read(joydev, buf, 10);
|
||||||
}
|
}
|
||||||
joypad = new JoyPad( index, joydev );
|
joypad = new JoyPad( index, joydev );
|
||||||
@ -368,7 +367,7 @@ void LayoutManager::updateJoyDevs() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int errsv = errno;
|
int errsv = errno;
|
||||||
printf("%s\n", strerror(errsv));
|
printf("error reading joypad dev device: %s\n", strerror(errsv));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//when it's all done, rebuild the popup menu so it displays the correct
|
//when it's all done, rebuild the popup menu so it displays the correct
|
||||||
|
@ -118,9 +118,9 @@ void LayoutEdit::windowActivationChange( bool oldActive ) {
|
|||||||
QHashIterator<int, JoyPad*> it( available );
|
QHashIterator<int, JoyPad*> it( available );
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
printf("iterating and releasing\n");
|
DEBUG("iterating and releasing\n");
|
||||||
it.next();
|
it.next();
|
||||||
it.value()->release();
|
it.value()->release();
|
||||||
}
|
}
|
||||||
printf("done releasing!\n");
|
DEBUG("done releasing!\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user