GLuint vIndex;
GLuint cIndex;
+GLfloat _tizen_cal_indicator_ratio(SDL_Window *window)
+{
+ SDL_WindowData *wind = window->driverdata;
+ GLfloat ratio = 1 - (GLfloat)(IINDICATOR_HEIGHT*2) / window->h;
+
+ if (!wind->support_pre_rotation && (wind->rotation==90 || wind->rotation==270))
+ ratio = 1 - (GLfloat)(IINDICATOR_HEIGHT*2) / window->w;
+ return ratio;
+}
+
Eina_Bool _tizen_timer_callback_indicator(void *data)
{
SDL_VideoDevice *_this = SDL_GetVideoDevice();
for( ; i<12; i+=2)
vVertices[i] = 1.0f;
- GLfloat ratio = 1 - (GLfloat)(IINDICATOR_HEIGHT*2) / window->h;
- vVertices[3] = vVertices[5] = vVertices[11] = ratio;
+ vVertices[3] = vVertices[5] = vVertices[11] = _tizen_cal_indicator_ratio(window);
}
void ModelMatrixMultiply(ModelMatrix *lhs, ModelMatrix *rhs, ModelMatrix *r)
0, GL_RGBA, GL_UNSIGNED_BYTE, (unsigned char*)(shared_info.fileInfo[idx].sharedFile->address));
}
-SDL_bool Tizen_isTouchIndicator(SDL_Window *window, int rot, int x, int y)
+SDL_bool Tizen_isTouchIndicator(SDL_Window *window, SDL_WindowData *wind, int rot, int x, int y)
{
if((window->flags & SDL_WINDOW_FULLSCREEN) || (window->flags & SDL_WINDOW_BORDERLESS))
return SDL_FALSE;
- if(x > window->x && x < window->x + window->w && y > window->y && y < window->y + IINDICATOR_HEIGHT)
+ if(wind->support_pre_rotation && x > window->x && x < window->x + window->w && y > window->y && y < window->y + IINDICATOR_HEIGHT)
+ return SDL_TRUE;
+
+ if(rot==0 && x > window->x && x < window->x + window->w && y > window->y && y < window->y + IINDICATOR_HEIGHT)
+ return SDL_TRUE;
+ if(rot==90 && x > window->x && x < window->x + IINDICATOR_HEIGHT && y > window->y && y < window->y + window->h)
+ return SDL_TRUE;
+ if(rot==270 && x > window->x + window->w -IINDICATOR_HEIGHT && x < window->x + window->w && y > window->y && y < window->y + window->h)
return SDL_TRUE;
return SDL_FALSE;
GLES2_Context Mainctx;
LoadContext(&Mainctx);
- GLfloat ratio = 1 - (GLfloat)(52*2) / window->h;
- vVertices[3] = vVertices[5] = vVertices[11] = ratio;
+ vVertices[3] = vVertices[5] = vVertices[11] = _tizen_cal_indicator_ratio(window);
Mainctx.glBindBuffer(GL_ARRAY_BUFFER, indicator_vbo);
Mainctx.glBufferData(GL_ARRAY_BUFFER, 12 * 4, vVertices, GL_STATIC_DRAW);
#include "../SDL_sysvideo.h"
#include "SDL_ecore_ipc.h"
+#include "SDL_tizenwindow.h"
extern void ModelMatrixTranslateInit(SDL_Window *window, int rot);
-extern SDL_bool Tizen_isTouchIndicator(SDL_Window *window, int rot, int x, int y);
+extern SDL_bool Tizen_isTouchIndicator(SDL_Window *window, SDL_WindowData *wind, int rot, int x, int y);
extern int Tizen_Indicator_GLES_Init(SDL_Window* window);
extern int Tizen_indicator_event_filter(void);
int x, y;
_tizen_get_mouseXY(window, (int)e->x, (int)e->y, &x, &y);
- if(Tizen_isTouchIndicator(window, wind->rotation, x, y))
+ if(Tizen_isTouchIndicator(window, wind, wind->rotation, x, y))
{
ModelMatrixTranslateInit(window, wind->rotation);
wind->indicator_show = SDL_TRUE;
wind->last_indicator_showtime = SDL_GetTicks();
+
+ if(!wind->support_pre_rotation)
+ Tizen_IndicatorProcessEvent(_this->current_glwin, wind->rotation);
}
SDL_SendMouseMotion(window, 0, 0, x, y);