Merged Paul's Google Summer of Code work from SDL-gsoc2010_android
This commit is contained in:
commit
a64fc29cfb
38 changed files with 2743 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue