Skip to content
Permalink
Browse files

Fixed compile warning

  • Loading branch information
slouken committed Feb 3, 2006
1 parent 911ac21 commit 1a8298700f0cfa906c91e6d52951a6ca85b9a668
Showing with 9 additions and 32 deletions.
  1. +9 −32 src/video/fbcon/SDL_fbevents.c
@@ -674,7 +674,7 @@ static void handle_tslib(_THIS)
while (ts_read(ts_dev, &sample, 1) > 0) {
button = (sample.pressure > 0) ? 1 : 0;
button <<= 2; /* must report it as button 3 */
FB_vgamousecallback(button, 0, sample.x, sample.y);
FB_vgamousecallback(button, 0, sample.x, sample.y);
}
return;
}
@@ -713,15 +713,18 @@ static void handle_mouse(_THIS)
packetsize = 3;
break;
case MOUSE_ELO:
packetsize = ELO_PACKET_SIZE;
relative = 0;
break;
/* try to read the next packet */
if(eloReadPosition(this, mouse_fd, &dx, &dy, &button, &realx, &realy)) {
button = (button & 0x01) << 2;
FB_vgamousecallback(button, 0, dx, dy);
}
return; /* nothing left to do */
case MOUSE_TSLIB:
#ifdef HAVE_TSLIB
handle_tslib(this);
#endif
return; /* nothing left to do */
case NUM_MOUSE_DRVS:
default:
/* Uh oh.. */
packetsize = 0;
break;
@@ -730,13 +733,6 @@ static void handle_mouse(_THIS)
/* Special handling for the quite sensitive ELO controller */
if (mouse_drv == MOUSE_ELO) {

/* try to read the next packet */
if(eloReadPosition(this, mouse_fd, &dx, &dy, &button, &realx, &realy)) {
button = (button & 0x01) << 2;
FB_vgamousecallback(button, relative, dx, dy);
}

return;
}

/* Read as many packets as possible */
@@ -834,26 +830,7 @@ static void handle_mouse(_THIS)
dx = (signed char)mousebuf[i+1];
dy = -(signed char)mousebuf[i+2];
break;
/*
case MOUSE_ELO:
if ( mousebuf[i] != ELO_START_BYTE ) {
i -= (packetsize-1);
continue;
}
if(!eloParsePacket(&(mousebuf[i]), &dx, &dy, &button)) {
i -= (packetsize-1);
continue;
}
button = (button & 0x01) << 2;
eloConvertXY(this, &dx, &dy);
break;
*/

case MOUSE_ELO:
case NUM_MOUSE_DRVS:
default:
/* Uh oh.. */
dx = 0;
dy = 0;

0 comments on commit 1a82987

Please sign in to comment.