From: huiyu.eun Date: Fri, 6 Jan 2017 07:12:12 +0000 (+0900) Subject: [SDL_Tizen] Fix pre-rotation issue X-Git-Tag: accepted/tizen/unified/20170407.190801~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=309ad9b7655945a4a254119380c992795398961a;p=platform%2Fupstream%2FSDL.git [SDL_Tizen] Fix pre-rotation issue [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 --- diff --git a/src/video/tizen/SDL_tizenwindow.c b/src/video/tizen/SDL_tizenwindow.c index d6ddfcb..04e2d19 100755 --- a/src/video/tizen/SDL_tizenwindow.c +++ b/src/video/tizen/SDL_tizenwindow.c @@ -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; }