Fixed using the event queue lock before the mutex was created.
This has the benefit of ending the otherwise-bogus complaints that SDL_GetError() reports "Passed a NULL mutex" if you call it instead of checking if SDL_CreateWindow() actually succeeded. :) --HG-- extra : rebase_source : 49ed52691094eab9dd4012bb97f32fbcc678551e
This commit is contained in:
parent
8069b5a7f3
commit
5c189f9803
1 changed files with 7 additions and 6 deletions
|
@ -123,12 +123,6 @@ SDL_StartEventLoop(void)
|
||||||
FIXME: Does this introduce any other bugs with events at startup?
|
FIXME: Does this introduce any other bugs with events at startup?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* No filter to start with, process most event types */
|
|
||||||
SDL_EventOK = NULL;
|
|
||||||
SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
|
|
||||||
SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
|
|
||||||
SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE);
|
|
||||||
|
|
||||||
/* Create the lock and set ourselves active */
|
/* Create the lock and set ourselves active */
|
||||||
#if !SDL_THREADS_DISABLED
|
#if !SDL_THREADS_DISABLED
|
||||||
if (!SDL_EventQ.lock) {
|
if (!SDL_EventQ.lock) {
|
||||||
|
@ -138,6 +132,13 @@ SDL_StartEventLoop(void)
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
#endif /* !SDL_THREADS_DISABLED */
|
#endif /* !SDL_THREADS_DISABLED */
|
||||||
|
|
||||||
|
/* No filter to start with, process most event types */
|
||||||
|
SDL_EventOK = NULL;
|
||||||
|
SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
|
||||||
|
SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
|
||||||
|
SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE);
|
||||||
|
|
||||||
SDL_EventQ.active = 1;
|
SDL_EventQ.active = 1;
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue