diff options
-rw-r--r-- | hw/kdrive/itsy/itsy.c | 1 | ||||
-rw-r--r-- | hw/kdrive/linux/linux.c | 1 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.h | 1 | ||||
-rw-r--r-- | hw/kdrive/src/kinput.c | 18 | ||||
-rw-r--r-- | hw/kdrive/vxworks/vxworks.c | 1 |
5 files changed, 18 insertions, 4 deletions
diff --git a/hw/kdrive/itsy/itsy.c b/hw/kdrive/itsy/itsy.c index 4f2ac1cbb..48b56b7ff 100644 --- a/hw/kdrive/itsy/itsy.c +++ b/hw/kdrive/itsy/itsy.c @@ -306,6 +306,7 @@ KdOsFuncs ItsyOsFuncs = { ItsyOsSpecialKey, ItsyOsDisable, ItsyOsFini, + 0 }; void diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index dadcee11f..23ae50452 100644 --- a/hw/kdrive/linux/linux.c +++ b/hw/kdrive/linux/linux.c @@ -471,6 +471,7 @@ KdOsFuncs LinuxFuncs = { LinuxSpecialKey, LinuxDisable, LinuxFini, + 0 }; void diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index bb9bc238d..5f937a5c9 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -276,6 +276,7 @@ typedef struct _KdOsFuncs { Bool (*SpecialKey) (KeySym); void (*Disable) (void); void (*Fini) (void); + void (*pollEvents) (void); } KdOsFuncs; typedef enum _KdSyncPolarity { diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index eb65cb98a..062d6820a 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -1468,7 +1468,8 @@ KdBlockHandler (int screen, pointer readmask) { KdMouseInfo *mi; - + int myTimeout=0; + for (mi = kdMouseInfo; mi; mi = mi->next) { if (mi->timeoutPending) @@ -1476,11 +1477,20 @@ KdBlockHandler (int screen, int ms; ms = mi->emulationTimeout - GetTimeInMillis (); - if (ms < 0) - ms = 0; - AdjustWaitForDelay (timeout, ms); + if (ms < 1) + ms = 1; + if(ms<myTimeout || myTimeout==0) + myTimeout=ms; } } + /* if we need to poll for events, do that */ + if(kdOsFuncs->pollEvents) + { + (*kdOsFuncs->pollEvents)(); + myTimeout=20; + } + if(myTimeout>0) + AdjustWaitForDelay (timeout, myTimeout); } void diff --git a/hw/kdrive/vxworks/vxworks.c b/hw/kdrive/vxworks/vxworks.c index 9bfc9e278..a40f7590f 100644 --- a/hw/kdrive/vxworks/vxworks.c +++ b/hw/kdrive/vxworks/vxworks.c @@ -59,6 +59,7 @@ KdOsFuncs VxWorksFuncs = { VxWorksSpecialKey, VxWorksDisable, VxWorksFini, + 0 }; void |