(Android) Add explicit runtime hack for Xperia Play so that

AKEYCODE_BACK behavior is not contingent on AKeyMeta (which
could produce problems on other pads). Hopefully should fix
some issues
This commit is contained in:
twinaphex 2013-03-02 11:27:24 +01:00
parent dbdb345c78
commit 2d4d9d181e
3 changed files with 15 additions and 2 deletions

View File

@ -143,8 +143,17 @@ static void android_input_poll(void *data)
}
else
{
int meta = AKeyEvent_getMetaState(event);
if (!(meta & AMETA_ALT_ON))
if (g_extern.lifecycle_mode_state & (1ULL << MODE_INPUT_XPERIA_PLAY_HACK))
{
int meta = AKeyEvent_getMetaState(event);
if (!(meta & AMETA_ALT_ON))
{
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
break;
}
}
else
{
*lifecycle_state |= (1ULL << RARCH_QUIT_KEY);
AInputQueue_finishEvent(android_app->inputQueue, event, handled);

View File

@ -664,6 +664,7 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
}
else if (strstr(name_buf, "keypad-zeus") || (strstr(name_buf, "keypad-game-zeus")))
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_INPUT_XPERIA_PLAY_HACK);
/* Xperia Play */
/* X/o/square/triangle/R1/L1/D-pad */
keycode_lut[AKEYCODE_DPAD_CENTER] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);

View File

@ -134,6 +134,9 @@ enum menu_enums
MODE_EXTLAUNCH_MULTIMAN,
MODE_EXIT,
MODE_EXITSPAWN,
#ifdef ANDROID
MODE_INPUT_XPERIA_PLAY_HACK,
#endif
MODE_VIDEO_TRIPLE_BUFFERING_ENABLE,
MODE_VIDEO_FLICKER_FILTER_ENABLE,
MODE_VIDEO_SOFT_FILTER_ENABLE,