diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-18 13:14:29 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-18 13:14:29 +0000 |
commit | 0941041e375be2d2659470ebcc5b37b67f11c1c7 (patch) | |
tree | 7f0492f6c071e73ed33b54e977da3bd79636fb24 /hw/tsc2005.c | |
parent | c30bb26499ef3421568c96fe77e65ed3d0b3b55f (diff) |
N810 keyboard slide open by default, add more comments.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4491 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/tsc2005.c')
-rw-r--r-- | hw/tsc2005.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/hw/tsc2005.c b/hw/tsc2005.c index 73cc3e0784..7708a36d55 100644 --- a/hw/tsc2005.c +++ b/hw/tsc2005.c @@ -197,10 +197,14 @@ static void tsc2005_write(struct tsc2005_state_s *s, int reg, uint16_t data) case 0xc: /* CFR0 */ s->host_mode = data >> 15; - s->enabled = !(data & 0x4000); - if (s->busy && !s->enabled) - qemu_del_timer(s->timer); - s->busy &= s->enabled; + if (s->enabled != !(data & 0x4000)) { + s->enabled = !(data & 0x4000); + fprintf(stderr, "%s: touchscreen sense %sabled\n", + __FUNCTION__, s->enabled ? "en" : "dis"); + if (s->busy && !s->enabled) + qemu_del_timer(s->timer); + s->busy &= s->enabled; + } s->nextprecision = (data >> 13) & 1; s->timing[0] = data & 0x1fff; if ((s->timing[0] >> 11) == 3) |