[SDL_Tizen] Fix pre-rotation issue 04/108904/1
authorhuiyu.eun <huiyu.eun@samsung.com>
Fri, 6 Jan 2017 07:12:12 +0000 (16:12 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Fri, 6 Jan 2017 07:12:37 +0000 (16:12 +0900)
[Problem] Occure pre-rotation error when setting one orientation.
[Cause] Called _tizen_cb_event_window_rotate callback 2 times.

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

index d6ddfcb..04e2d19 100755 (executable)
@@ -244,11 +244,11 @@ _tizen_window_orientaiton_hint_callback(void *userdata, const char *name, const
     if (j > 0) {
         if (j == 1) {
             ecore_wl_window_rotation_preferred_rotation_set(window,wind->rotation);
-            if (wind->support_pre_rotation) {
+            if (wind->support_pre_rotation)
                 Tizen_pre_rotation_set(wind);
-            }
+        }else {
+            ecore_wl_window_rotation_available_rotations_set(window, (const int*)checked, j);
         }
-        ecore_wl_window_rotation_available_rotations_set(window, (const int*)checked, j);
     }
 }
 
@@ -559,9 +559,9 @@ _tizen_cb_event_window_rotate(void *data, int type EINA_UNUSED, void *event)
         ecore_wl_window_rotation_set(ew, ev->angle);
         // Send Rotation Event
         _tizen_send_rotation_event(window, ev->angle);
+        wind->received_rotation = 1;
     }
 
-    wind->received_rotation = 1;
     return ECORE_CALLBACK_PASS_ON;
 }