src/render/SDL_render.c
changeset 12910 dd9169424181
parent 12909 8e27bc5f03d8
child 13019 ecad0a0684ad
     1.1 --- a/src/render/SDL_render.c	Fri Jun 28 16:14:50 2019 +0200
     1.2 +++ b/src/render/SDL_render.c	Fri Jun 28 16:38:42 2019 +0200
     1.3 @@ -29,6 +29,9 @@
     1.4  #include "SDL_sysrender.h"
     1.5  #include "software/SDL_render_sw_c.h"
     1.6  
     1.7 +#if defined(__ANDROID__)
     1.8 +#  include "../core/android/SDL_android.h"
     1.9 +#endif
    1.10  
    1.11  #define SDL_WINDOWRENDERDATA    "_SDL_WindowRenderData"
    1.12  
    1.13 @@ -837,6 +840,10 @@
    1.14      SDL_bool batching = SDL_TRUE;
    1.15      const char *hint;
    1.16  
    1.17 +#if defined(__ANDROID__)
    1.18 +    Android_ActivityMutex_Lock_Running();
    1.19 +#endif
    1.20 +
    1.21      if (!window) {
    1.22          SDL_SetError("Invalid window");
    1.23          goto error;
    1.24 @@ -951,9 +958,16 @@
    1.25      SDL_LogInfo(SDL_LOG_CATEGORY_RENDER,
    1.26                  "Created renderer: %s", renderer->info.name);
    1.27  
    1.28 +#if defined(__ANDROID__)
    1.29 +    Android_ActivityMutex_Unlock();
    1.30 +#endif
    1.31      return renderer;
    1.32  
    1.33  error:
    1.34 +
    1.35 +#if defined(__ANDROID__)
    1.36 +    Android_ActivityMutex_Unlock();
    1.37 +#endif
    1.38      return NULL;
    1.39  
    1.40  #else