summaryrefslogtreecommitdiff
path: root/driver/mouse.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-08-19 03:15:50 +0200
committerMiguel <m.i@gmx.at>2018-08-19 03:15:50 +0200
commit9b13ca03dacb6a385461dccad319010537add5cf (patch)
tree4397fdff0d1566b7bec761031ce2077e88cd5379 /driver/mouse.c
parenta2bd733e517364b6c9ddd26706d85fac09656854 (diff)
get vesa working in vmem.
Diffstat (limited to 'driver/mouse.c')
-rw-r--r--driver/mouse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/mouse.c b/driver/mouse.c
index d676f45..d4dbb56 100644
--- a/driver/mouse.c
+++ b/driver/mouse.c
@@ -100,6 +100,7 @@ void mouse_init()
void mouse_log()
{
//log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%02x / %02x / %02x ",mouse_byte[0], mouse_byte[1],mouse_byte[2]);
+ //TODO: ignore last packet for 4packets mouse and resync if you get out of sync
if(mouse_byte[0]&0x80||mouse_byte[0]&0x40)return; //skip packet on overflow
if(!(mouse_byte[0]&0x8))panic(FOOLOS_MODULE_NAME,"mouse packets out of sync!?"); // this bit is always 1, otherwise panic!
@@ -128,6 +129,8 @@ void mouse_log()
if(mouse_y>600)mouse_y=600;
log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%d / %d / %02x ",mouse_x, mouse_y,mouse_byte[2]);
+ if (mouse_byte[0] & 1)vesa_put_rect(mouse_x,600-mouse_y,10,10,0x00ffff);
+ else vesa_put_rect(mouse_x,600-mouse_y,10,10,0x0000ff);
//PutFont('X', mouse_x,600-mouse_y, 0xffffff);
}