mirror of https://github.com/kivy/kivy.git
Merge pull request #3947 from kived/sdl2-poll-release-gil
release gil when polling for sdl events
This commit is contained in:
commit
c7b0b20be4
|
@ -238,8 +238,11 @@ cdef class _WindowSDL2Storage:
|
|||
|
||||
def poll(self):
|
||||
cdef SDL_Event event
|
||||
cdef int rv
|
||||
|
||||
if SDL_PollEvent(&event) == 0:
|
||||
with nogil:
|
||||
rv = SDL_PollEvent(&event)
|
||||
if rv == 0:
|
||||
return False
|
||||
|
||||
action = None
|
||||
|
|
|
@ -467,7 +467,7 @@ cdef extern from "SDL.h":
|
|||
cdef Uint32 SDL_GetTicks()
|
||||
cdef void SDL_Delay(Uint32 ms) nogil
|
||||
cdef Uint8 SDL_EventState(Uint32 type, int state)
|
||||
cdef int SDL_PollEvent(SDL_Event * event)
|
||||
cdef int SDL_PollEvent(SDL_Event * event) nogil
|
||||
cdef void SDL_SetEventFilter(SDL_EventFilter *filter, void* userdata)
|
||||
cdef SDL_RWops * SDL_RWFromFile(char *file, char *mode)
|
||||
cdef SDL_RWops * SDL_RWFromMem(void *mem, int size)
|
||||
|
|
Loading…
Reference in New Issue