return;
}
+int
+_tizen_get_rotation_idx(int rotation)
+{
+ return ((rotation % 360) / 90);
+}
+
void
_tizen_rotation_do(SDL_Window *window, SDL_WindowData* wind, int rotation)
{
_tizen_set_window_size(window, window_w, window_h);
if(wind->support_pre_rotation)
+ {
Tizen_pre_rotation_set(wind, rotation);
+ wl_egl_window_set_buffer_transform(wind->egl_window, _tizen_get_rotation_idx(rotation));
+ wl_egl_window_set_window_transform(wind->egl_window, _tizen_get_rotation_idx(wind->rotation));
+ }
+ else
+ {
+ wl_egl_window_resize(wind->egl_window, window_w, window_h, 0, 0);
+ wl_egl_window_set_buffer_transform(wind->egl_window, _tizen_get_rotation_idx((360 - wind->rotation)));
+ wl_egl_window_set_window_transform(wind->egl_window, _tizen_get_rotation_idx(0));
+ }
- _tizen_send_rotation_event(window, wind->rotation);
+
+ _tizen_send_rotation_event(window, 0);
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SIZE_CHANGED, window->w, window->h);
}
//Set Screen Rotation
wind->output_rotation = screen_rotation;
- if(wind->support_pre_rotation)
- ecore_wl_window_buffer_transform_set(wind->window, wind->output_rotation / 90);
ecore_wl_window_rotation_set(wind->window, wind->rotation);