elm_win_screen_size_get(m_window, NULL, NULL, &scr_w, &scr_h);
m_screenWidth = scr_w;
m_screenHeight = scr_h;
+ bool landscape_display_device = false;
+
+ if (scr_w > scr_h)
+ landscape_display_device = true;
switch (degree) {
case 0:
- m_screenWidth = MIN(scr_w, scr_h);
- m_screenHeight = MAX(scr_w, scr_h);
- break;
case 180:
- m_screenWidth = MIN(scr_w, scr_h);
- m_screenHeight = MAX(scr_w, scr_h);
+ if (landscape_display_device) {
+ m_screenWidth = MAX(scr_w, scr_h);
+ m_screenHeight = MIN(scr_w, scr_h);
+ }
+ else {
+ m_screenWidth = MIN(scr_w, scr_h);
+ m_screenHeight = MAX(scr_w, scr_h);
+ }
break;
case 90:
- m_screenWidth = MAX(scr_w, scr_h);
- m_screenHeight = MIN(scr_w, scr_h);
- break;
case 270:
- m_screenWidth = MAX(scr_w, scr_h);
- m_screenHeight = MIN(scr_w, scr_h);
+ if (landscape_display_device) {
+ m_screenWidth = MIN(scr_w, scr_h);
+ m_screenHeight = MAX(scr_w, scr_h);
+ }
+ else {
+ m_screenWidth = MAX(scr_w, scr_h);
+ m_screenHeight = MIN(scr_w, scr_h);
+ }
break;
default:
break;