Merged Paul's Google Summer of Code work from SDL-gsoc2010_android

This commit is contained in:
Sam Lantinga 2010-08-22 12:23:55 -07:00
commit a64fc29cfb
38 changed files with 2743 additions and 7 deletions

View file

@ -92,11 +92,13 @@ SDL_Unlock_EventThread(void)
static __inline__ SDL_bool
SDL_ShouldPollJoystick()
{
#if !SDL_JOYSTICK_DISABLED
if (SDL_numjoysticks &&
(!SDL_disabled_events[SDL_JOYAXISMOTION >> 8] ||
SDL_JoystickEventState(SDL_QUERY))) {
return SDL_TRUE;
}
#endif
return SDL_FALSE;
}

View file

@ -729,7 +729,7 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode)
break;
default:
/* Invalid state -- bail */
return 0;
return 2;
}
/* Drop events that don't change state */
@ -738,14 +738,14 @@ SDL_SendKeyboardKey(Uint8 state, SDL_scancode scancode)
#if 0
printf("Keyboard event didn't change state - dropped!\n");
#endif
return 0;
return 3;
}
/* Update internal keyboard state */
keyboard->keystate[scancode] = state;
/* Post the event, if desired */
posted = 0;
posted = 4;
if (SDL_GetEventState(type) == SDL_ENABLE) {
SDL_Event event;
event.key.type = type;