aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput/mouse.c
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-12-20 08:41:59 -0800
committerTectu <joel@unormal.org>2012-12-20 08:41:59 -0800
commit65aa1d42d6421a47880d826b2cd8e532b17fc55c (patch)
tree89d346903bcacba72d2d28571cdab69f0b71a15e /src/ginput/mouse.c
parente00f8593e85245a847280dafe10e5a834268557e (diff)
parent2c5d5c51183fbdb01f24afdbb5d29dbf00f4f836 (diff)
downloaduGFX-65aa1d42d6421a47880d826b2cd8e532b17fc55c.tar.gz
uGFX-65aa1d42d6421a47880d826b2cd8e532b17fc55c.tar.bz2
uGFX-65aa1d42d6421a47880d826b2cd8e532b17fc55c.zip
Merge pull request #29 from inmarket/master
New demos, ginput fix, SSD1289 fix
Diffstat (limited to 'src/ginput/mouse.c')
-rw-r--r--src/ginput/mouse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ginput/mouse.c b/src/ginput/mouse.c
index 35a55bc5..94734888 100644
--- a/src/ginput/mouse.c
+++ b/src/ginput/mouse.c
@@ -378,6 +378,10 @@ GSourceHandle ginputGetMouse(uint16_t instance) {
}
bool_t ginputGetMouseStatus(uint16_t instance, GEventMouse *pe) {
+ // Win32 threads don't seem to recognise priority and/or pre-emption
+ // so we add a sleep here to prevent 100% polled applications from locking up.
+ chThdSleepMilliseconds(1);
+
if (instance || (MouseConfig.flags & (FLG_INIT_DONE|FLG_IN_CAL)) != FLG_INIT_DONE)
return FALSE;