[SDL_Tizen] Fix indicator issue using multi-thread 11/104811/1
authorhuiyu.eun <huiyu.eun@samsung.com>
Wed, 14 Dec 2016 10:20:33 +0000 (19:20 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Wed, 14 Dec 2016 10:21:35 +0000 (19:21 +0900)
Change-Id: I8878449a08f5aac981b43d54a92ff98597b7ced3
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/video/tizen/SDL_tizenopengles.c
src/video/tizen/SDL_tizenvideo.h
src/video/tizen/SDL_tizenwindow.c

index fd10301..cb5cdc8 100755 (executable)
@@ -573,6 +573,9 @@ Tizen_GLES_CreateContext(_THIS, SDL_Window *window)
 
     if(!(window->flags & SDL_WINDOW_FULLSCREEN) && !(window->flags & SDL_WINDOW_BORDERLESS))
     {
+        SDL_VideoData *data = (SDL_VideoData *) (SDL_GetVideoDevice()->driverdata);
+        if(data->current_thread != SDL_GetThreadID(0))
+            return context;
         if(!Indicator_GLES_Init(window))
         {
             SDL_Log("Indicator GLES init error!");
index b7b5b9e..de5068c 100755 (executable)
@@ -36,6 +36,7 @@ typedef struct {
     EGLConfig econf;
 
     Eina_Hash *windows;
+    unsigned int current_thread;
 } SDL_VideoData;
 
 #endif /* _SDL_tizenvideo_h */
index 58ee7c6..6c14ea7 100755 (executable)
@@ -574,6 +574,8 @@ Tizen_InitWindow(_THIS)
     ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_OUT,
                         _tizen_cb_event_mouse_out,_this);
 
+    data->current_thread = SDL_GetThreadID(0);
+
     return 0;
 }