Browse Source

WinPhone: force screen orientation to LandScape.

Wei Mingzhi 9 years ago
parent
commit
877c29f0fb
2 changed files with 6 additions and 3 deletions
  1. 2 2
      input.c
  2. 4 1
      main.c

+ 2 - 2
input.c

@@ -853,7 +853,7 @@ PAL_TouchEventFilter(
       if (lpEvent->tfinger.fingerId == finger1)
       {
          int area = PAL_GetTouchArea(lpEvent->tfinger.x, lpEvent->tfinger.y);
-         if (prev_touch1 != area)
+         if (prev_touch1 != area && area != TOUCH_NONE)
          {
             PAL_UnsetTouchAction(prev_touch1);
             prev_touch1 = area;
@@ -863,7 +863,7 @@ PAL_TouchEventFilter(
       else if (lpEvent->tfinger.fingerId == finger2)
       {
          int area = PAL_GetTouchArea(lpEvent->tfinger.x, lpEvent->tfinger.y);
-         if (prev_touch2 != area)
+         if (prev_touch2 != area && area != TOUCH_NONE)
          {
             PAL_UnsetTouchAction(prev_touch2);
             prev_touch2 = area;

+ 4 - 1
main.c

@@ -396,7 +396,6 @@ PAL_SplashScreen(
       }
 
       PAL_RLEBlitToSurface(lpBitmapTitle, gpScreen, PAL_XY(255, 10));
-
       VIDEO_UpdateScreen(NULL);
 
       //
@@ -505,6 +504,10 @@ main(
    }
 #endif
 
+#ifdef __WINPHONE__
+   SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeRight");
+#endif
+
    UTIL_OpenLog();
 
 #ifdef _WIN32