Browse Source

WP8: show menu when pressed back key

Wei Mingzhi 9 years ago
parent
commit
6fdea6f91f
3 changed files with 4 additions and 13 deletions
  1. 0 1
      common.h
  2. 4 7
      input.c
  3. 0 5
      winphone/WinPhoneUtil.cpp

+ 0 - 1
common.h

@@ -126,7 +126,6 @@ extern "C"
 
 FILE *MY_fopen(const char *path, const char *mode);
 #define fopen MY_fopen
-void WinPhone_OnBackKeyPress();
 
 #else
 

+ 4 - 7
input.c

@@ -95,12 +95,6 @@ PAL_KeyboardEventFilter(
          break;
 #endif
 
-#ifdef __WINPHONE__
-	  case SDLK_AC_BACK:
-         WinPhone_OnBackKeyPress();
-         break;
-#endif
-
       case SDLK_UP:
       case SDLK_KP8:
          g_InputState.prevdir = (gpGlobals->fInBattle ? kDirUnknown : g_InputState.dir);
@@ -143,6 +137,9 @@ PAL_KeyboardEventFilter(
       case SDLK_LALT:
       case SDLK_RALT:
       case SDLK_KP0:
+#ifdef __WINPHONE__
+	  case SDLK_AC_BACK:
+#endif
          g_InputState.dwKeyPress |= kKeyMenu;
          break;
 
@@ -760,7 +757,7 @@ PAL_SetTouchAction(
       }
       else
       {
-         g_InputState.dwKeyPress |= kKeyThrowItem;
+         g_InputState.dwKeyPress |= kKeyForce;
       }
 	  break;
 

+ 0 - 5
winphone/WinPhoneUtil.cpp

@@ -42,8 +42,3 @@ MY_fopen(const char *path, const char *mode)
 	}
 	return fp;
 }
-
-extern "C" void
-WinPhone_OnBackKeyPress()
-{
-}