Clear mouse input ntf fd on each event loop
This commit is contained in:
@@ -85,9 +85,12 @@ void sdlPollInput(void)
|
|||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
||||||
//printf("sdlPollInput() %d thread %d fd %d\n", SDL_GetTicks(), (int) pthread_self(), sdlInputNotifyFd[0]);
|
//printf("sdlPollInput() %d thread %d fd %d\n", SDL_GetTicks(), (int) pthread_self(), sdlInputNotifyFd[0]);
|
||||||
|
while (read(sdlInputNotifyFd[0], &buf, 1) == 1) { }
|
||||||
|
|
||||||
while ( SDL_PollEvent(&event) ) {
|
while ( SDL_PollEvent(&event) )
|
||||||
switch (event.type) {
|
{
|
||||||
|
switch (event.type)
|
||||||
|
{
|
||||||
case SDL_MOUSEMOTION:
|
case SDL_MOUSEMOTION:
|
||||||
//printf("SDL_MOUSEMOTION x:y %d:%d buttons %d\n", event.motion.x, event.motion.y, mouseState);
|
//printf("SDL_MOUSEMOTION x:y %d:%d buttons %d\n", event.motion.x, event.motion.y, mouseState);
|
||||||
KdEnqueuePointerEvent(sdlPointer, mouseState, event.motion.x, event.motion.y, pressure);
|
KdEnqueuePointerEvent(sdlPointer, mouseState, event.motion.x, event.motion.y, pressure);
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
adb forward tcp:6001 tcp:6000
|
adb forward tcp:6001 tcp:6000
|
||||||
|
|
||||||
env DISPLAY=127.0.0.1:1 sh -c "x-window-manager & xlogo & xev"
|
env DISPLAY=127.0.0.1:1 sh -c "xfwm4 & xlogo & xev"
|
||||||
|
|||||||
Reference in New Issue
Block a user