#if SDL_VIDEO_OPENGL_EGL
#include "SDL_log.h"
+#include "SDL_hints.h"
#include "SDL_tizenopengles.h"
#include "SDL_tizenindicator.h"
#include "SDL_tizenvideo.h"
#include "SDL_tizenwindow.h"
+#include "../../events/SDL_windowevents_c.h"
+
#if SDL_VIDEO_OPENGL
#include "SDL_opengl.h"
#endif /* SDL_VIDEO_OPENGL */
Tizen_DrawIndicator(window);
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;
+ }
+ }
+ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SIZE_CHANGED, window->w, window->h);
+
+ const char* hint = SDL_GetHint(SDL_HINT_ORIENTATIONS);
+ if(hint && *hint != '\0')
+ Tizen_IndicatorProcessEvent(_this->current_glwin, wdata->rotation);
+
ecore_wl_window_rotation_change_done_send(wdata->window);
wdata->received_rotation = 0;
}
}
void
-_tizen_pre_rotation_set(SDL_WindowData *_this)
+Tizen_pre_rotation_set(SDL_WindowData *_this)
{
tizen_wl_egl_window_rotation rot;
if (!_this->egl_window) return;
if (j == 1) {
ecore_wl_window_rotation_preferred_rotation_set(window,wind->rotation);
if (wind->support_pre_rotation) {
- _tizen_pre_rotation_set(wind);
+ Tizen_pre_rotation_set(wind);
}
}
ecore_wl_window_rotation_available_rotations_set(window, (const int*)checked, j);
/* set ecore_wayland window rotation */
wind->rotation = ev->angle;
ecore_wl_window_rotation_set(ew, ev->angle);
-
- if(wind->support_pre_rotation) {
- _tizen_pre_rotation_set(wind);
-
- int aw, ah;
- wl_egl_window_get_attached_size(wind->egl_window, &aw, &ah);
- wl_egl_window_resize(wind->egl_window, aw, ah, 0, 0);
-
- if(wind->rotation == 90 || wind->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;
- }
- }
-
// Send Rotation Event
_tizen_send_rotation_event(window, ev->angle);
- SDL_SendWindowEvent(window, SDL_WINDOWEVENT_SIZE_CHANGED, window->w, window->h);
}
wind->received_rotation = 1;
- const char* hint = SDL_GetHint(SDL_HINT_ORIENTATIONS);
- if(hint && *hint != '\0')
- Tizen_IndicatorProcessEvent(_this->current_glwin, wind->rotation);
-
return ECORE_CALLBACK_PASS_ON;
}