ibmpc_usb: Add mouse extended report support
This commit is contained in:
parent
231b288ed9
commit
51ceca97f7
2 changed files with 13 additions and 5 deletions
|
|
@ -43,7 +43,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define G80_2551_SUPPORT
|
||||
|
||||
// PS/2 Mouse support
|
||||
#define IBMPC_MOUSE_ENABLE
|
||||
//#define IBMPC_MOUSE_ENABLE
|
||||
|
||||
// Mouse Extended Report
|
||||
//#define MOUSE_EXT_REPORT
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -574,9 +574,14 @@ MOUSE_DONE:
|
|||
#define CHOP8(a) (((a) > 127) ? 127 : (((a) < -127) ? -127 : (a)))
|
||||
report_mouse_t mouse_report = {};
|
||||
mouse_report.buttons = mouse_btn;
|
||||
#ifdef MOUSE_EXT_REPORT
|
||||
mouse_report.x = x;
|
||||
mouse_report.y = -y;
|
||||
#else
|
||||
mouse_report.x = CHOP8(x);
|
||||
mouse_report.y = -(CHOP8(y));
|
||||
mouse_report.v = -(CHOP8(v));
|
||||
mouse_report.y = -CHOP8(y);
|
||||
#endif
|
||||
mouse_report.v = -CHOP8(v);
|
||||
mouse_report.h = CHOP8(h);
|
||||
host_mouse_send(&mouse_report);
|
||||
xprintf("M[x:%d y:%d v:%d h:%d b:%02X]\n", mouse_report.x, mouse_report.y,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue