if (wdata->received_rotation == 1) {
if(wdata->support_pre_rotation) {
- Tizen_pre_rotation_set(wdata);
- int aw, ah;
- wl_egl_window_get_attached_size(wdata->egl_window, &aw, &ah);
- wl_egl_window_resize(wdata->egl_window, aw, ah, 0, 0);
- if(wdata->rotation == 90 || wdata->rotation == 270) {
- SDL_SetWindowSize(window, ah, aw);
- window->w = ah;//for Fullscreen
- window->h = aw;
- } else {
- SDL_SetWindowSize(window, aw, ah);//->call wl_egl_window_resize()
- window->w = aw;//for Fullscreen
- window->h = ah;
+ int screen_w, screen_h;
+ if(wdata->rotation==90 || wdata->rotation==270)
+ ecore_wl_screen_size_get(&screen_h, &screen_w);
+ else
+ ecore_wl_screen_size_get(&screen_w, &screen_h);
+
+ SDL_SetWindowSize(window, screen_w, screen_h);
+ if(window->flags & SDL_WINDOW_FULLSCREEN)
+ {
+ window->w = screen_w;
+ window->h = screen_h;
}
+
+ wl_egl_window_resize(wdata->egl_window, window->w, window->h, 0, 0);
+ Tizen_pre_rotation_set(wdata);
}
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SIZE_CHANGED, window->w, window->h);
ecore_wl_window_rotation_change_done_send(wdata->window);