… | … | ||
---|---|---|---|
663 | SDL_GL_SwapBuffers () | 663 | SDL_GL_SwapBuffers () |
664 | 664 | ||
665 | char * | 665 | char * |
666 | SDL_GetKeyName (int sym) | 666 | SDL_GetKeyName (int sym) |
667 | 667 | ||
668 | int | ||
669 | SDL_GetAppState () | ||
670 | |||
668 | void | 671 | void |
669 | SDL_PollEvent () | 672 | poll_events () |
670 | PPCODE: | 673 | PPCODE: |
671 | { | 674 | { |
672 | SDL_Event ev; | 675 | SDL_Event ev; |
673 | 676 | ||
674 | while (SDL_PollEvent (&ev)) | 677 | SDL_PumpEvents (); |
678 | while (SDL_PeepEvents (&ev, 1, SDL_GETEVENT, SDL_ALLEVENTS) > 0) | ||
675 | { | 679 | { |
676 | HV *hv = newHV (); | 680 | HV *hv = newHV (); |
677 | hv_store (hv, "type", 4, newSViv (ev.type), 0); | 681 | hv_store (hv, "type", 4, newSViv (ev.type), 0); |
678 | 682 | ||
679 | switch (ev.type) | 683 | switch (ev.type) |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |