[SDL_Tizen] Delete getenv 97/140097/1
authorhuiyu.eun <huiyu.eun@samsung.com>
Mon, 24 Jul 2017 01:35:13 +0000 (10:35 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Mon, 24 Jul 2017 01:36:26 +0000 (10:36 +0900)
delte getenv
- prerotation
- vsync timer

Change-Id: I9dc03a96bc7c6c2872014441defd85e0f06414d7
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/timer/SDL_timer.c
src/video/tizen/SDL_tizenwindow.c

index e8dfedc..379b852 100755 (executable)
@@ -226,17 +226,6 @@ SDL_TimerThread(void *_data)
 int
 SDL_TimerInit(void)
 {
-#if defined(__TIZEN__)
-    int vsync_timer;
-    if (getenv("SDL_VSYNC_TIMER")) {
-        vsync_timer = 1;
-    }
-    else {
-        vsync_timer = 0;
-    }
-
-
-#endif
     SDL_TimerData *data = &SDL_timer_data;
 
     if (!data->active) {
@@ -253,25 +242,22 @@ SDL_TimerInit(void)
         }
 
         data->active = SDL_TRUE;
+
 #if defined(__TIZEN__)
-        if (vsync_timer) {
-            const char* DRM_DEVICE = "/dev/dri/card0";
-            data->drm_fd = open( DRM_DEVICE, O_RDWR );
-
-            if (data->drm_fd > -1) {
-                data->vblankInfo.request.type = DRM_VBLANK_NEXTONMISS;
-                data->vblankInfo.request.sequence = 0;
-                data->vblankInfo.request.signal = 0;
-
-                data->vblankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
-                data->vblankInfo.reply.sequence = 0;
-                data->vblankInfo.reply.tval_sec = 0;
-                data->vblankInfo.reply.tval_usec = 0;
-            }
-        }
-        else {
-            data->drm_fd = -1;
-        }
+    const char* DRM_DEVICE = "/dev/dri/card0";
+    data->drm_fd = -1;
+    data->drm_fd = open( DRM_DEVICE, O_RDWR );
+
+    if (data->drm_fd > -1) {
+        data->vblankInfo.request.type = DRM_VBLANK_NEXTONMISS;
+        data->vblankInfo.request.sequence = 0;
+        data->vblankInfo.request.signal = 0;
+
+        data->vblankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
+        data->vblankInfo.reply.sequence = 0;
+        data->vblankInfo.reply.tval_sec = 0;
+        data->vblankInfo.reply.tval_usec = 0;
+    }
 #endif
         /* !!! FIXME: this is nasty. */
 #if defined(__WIN32__) && !defined(HAVE_LIBC)
index b4000c4..1ac2464 100755 (executable)
 #include <unistd.h>
 #include <errno.h>
 
-enum {
-    ROTATION_TYPE_NORMAL_ROTATION = 0,
-    ROTATION_TYPE_PRE_ROTATION,      /* use pre-rotation */
-};
-
 #define LOAD_FUNC(NAME) \
 _this->tizen_pre_rotation_data.NAME = SDL_LoadFunction(_this->tizen_pre_rotation_data.prerotation_dll_handle, #NAME); \
 if (!_this->tizen_pre_rotation_data.NAME) \
@@ -278,25 +273,6 @@ _tizen_init_ecore_ipc()
     return 0;
 }
 
-static int
-_tizen_rotation_type_get()
-{
-    static int type = ROTATION_TYPE_PRE_ROTATION;
-    static int checked = 0;
-    char *engine = NULL;
-
-    if (checked) return type;
-
-    engine = getenv("SDL_ROTATION");
-
-
-    if (engine && (!strcasecmp(engine, "normal")))
-        type = ROTATION_TYPE_NORMAL_ROTATION;
-
-    checked = 1;
-    return type;
-}
-
 int
 _tizen_PreRotatotion_LoadLibrary(SDL_VideoData *_this, const char *lib_path)
 {
@@ -810,7 +786,7 @@ Tizen_CreateWindow(_THIS, SDL_Window *window)
 
         //Support PreRotation
         wind->support_pre_rotation = 0;
-        if (_tizen_rotation_type_get() && _tizen_PreRotatotion_LoadLibrary(data, "libwayland-egl.so.1")) {
+        if (_tizen_PreRotatotion_LoadLibrary(data, "libwayland-egl.so.1")) {
             if (data->tizen_pre_rotation_data.wl_egl_window_get_capabilities(wind->egl_window) == TIZEN_WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED ) {
                 wind->support_pre_rotation = 1;
             }