[SDL_Tizen] Modify MakeCurrent 13/110813/2
authorhuiyu.eun <huiyu.eun@samsung.com>
Wed, 18 Jan 2017 06:24:52 +0000 (15:24 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Wed, 18 Jan 2017 06:27:11 +0000 (15:27 +0900)
If have not window and have context, pass context.

Change-Id: I1f988cef81504b895992d9cdb33376ba710f1eb8
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/video/tizen/SDL_tizenopengles.c

index de29f13..2390555 100755 (executable)
@@ -98,7 +98,11 @@ Tizen_GLES_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
 
     if (window && context) {
         ret = SDL_EGL_MakeCurrent(_this, ((SDL_WindowData *) window->driverdata)->egl_surface, context);
-    } else {
+    }
+    else if(!window && context) {
+        ret = SDL_EGL_MakeCurrent(_this, NULL, context);
+    }
+    else {
         ret = SDL_EGL_MakeCurrent(_this, NULL, NULL);
     }