Mercurial > sdl-ios-xcode
comparison src/video/nds/SDL_ndsevents.c @ 2678:3895761db26a gsoc2008_nds
Removed old touchscreen system, starting to implement mouse-based touchscreen. Also, more work on a non-software-rendering video driver
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Thu, 10 Jul 2008 23:35:01 +0000 |
parents | 082cc3ffd7d8 |
children | e1da92da346c |
comparison
equal
deleted
inserted
replaced
2677:6386764eb222 | 2678:3895761db26a |
---|---|
37 | 37 |
38 void | 38 void |
39 NDS_PumpEvents(_THIS) | 39 NDS_PumpEvents(_THIS) |
40 { | 40 { |
41 scanKeys(); | 41 scanKeys(); |
42 /* TODO: defer click-age */ | |
43 if(keysDown() & KEY_TOUCH) { | |
44 SDL_SendMouseButton(0, SDL_PRESSED, 0); | |
45 } else if(keysUp() & KEY_TOUCH) { | |
46 SDL_SendMouseButton(0, SDL_RELEASED, 0); | |
47 } | |
48 if(keysHeld() & KEY_TOUCH) { | |
49 touchPosition t = touchReadXY(); | |
50 SDL_SendMouseMotion(0, 0, t.px, t.py); | |
51 } | |
42 } | 52 } |
43 | 53 |
44 /* vi: set ts=4 sw=4 expandtab: */ | 54 /* vi: set ts=4 sw=4 expandtab: */ |