Commit 17858398 authored by Sam Lantinga's avatar Sam Lantinga

Fixed compile warning

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401326
parent f4ce91d5
...@@ -674,7 +674,7 @@ static void handle_tslib(_THIS) ...@@ -674,7 +674,7 @@ static void handle_tslib(_THIS)
while (ts_read(ts_dev, &sample, 1) > 0) { while (ts_read(ts_dev, &sample, 1) > 0) {
button = (sample.pressure > 0) ? 1 : 0; button = (sample.pressure > 0) ? 1 : 0;
button <<= 2; /* must report it as button 3 */ 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; return;
} }
...@@ -713,15 +713,18 @@ static void handle_mouse(_THIS) ...@@ -713,15 +713,18 @@ static void handle_mouse(_THIS)
packetsize = 3; packetsize = 3;
break; break;
case MOUSE_ELO: case MOUSE_ELO:
packetsize = ELO_PACKET_SIZE; /* try to read the next packet */
relative = 0; if(eloReadPosition(this, mouse_fd, &dx, &dy, &button, &realx, &realy)) {
break; button = (button & 0x01) << 2;
FB_vgamousecallback(button, 0, dx, dy);
}
return; /* nothing left to do */
case MOUSE_TSLIB: case MOUSE_TSLIB:
#ifdef HAVE_TSLIB #ifdef HAVE_TSLIB
handle_tslib(this); handle_tslib(this);
#endif #endif
return; /* nothing left to do */ return; /* nothing left to do */
case NUM_MOUSE_DRVS: default:
/* Uh oh.. */ /* Uh oh.. */
packetsize = 0; packetsize = 0;
break; break;
...@@ -730,13 +733,6 @@ static void handle_mouse(_THIS) ...@@ -730,13 +733,6 @@ static void handle_mouse(_THIS)
/* Special handling for the quite sensitive ELO controller */ /* Special handling for the quite sensitive ELO controller */
if (mouse_drv == MOUSE_ELO) { 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 */ /* Read as many packets as possible */
...@@ -834,26 +830,7 @@ static void handle_mouse(_THIS) ...@@ -834,26 +830,7 @@ static void handle_mouse(_THIS)
dx = (signed char)mousebuf[i+1]; dx = (signed char)mousebuf[i+1];
dy = -(signed char)mousebuf[i+2]; dy = -(signed char)mousebuf[i+2];
break; break;
/* default:
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:
/* Uh oh.. */ /* Uh oh.. */
dx = 0; dx = 0;
dy = 0; dy = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment