diff --git a/Common/KeyMap.cpp b/Common/KeyMap.cpp index cf581e530e..f83cf56b0f 100644 --- a/Common/KeyMap.cpp +++ b/Common/KeyMap.cpp @@ -854,7 +854,7 @@ bool IsNvidiaShield(const std::string &name) { } bool IsXperiaPlay(const std::string &name) { - return name == "Sony Ericsson:R800a" || name == "Sony Ericsson:R800i" || name == "Sony Ericsson:R800x" || name == "Sony Ericsson:R800at" || name == "Sony Ericsson:SO-01D" || name == "Sony Ericsson:zeus"; + return name == "Sony Ericsson:R800a" || name == "Sony Ericsson:R800i" || name == "Sony Ericsson:R800x" || name == "Sony Ericsson:R800at" || name == "Sony Ericsson:SO-01D" || name == "Sony Ericsson:zeus"; } bool IsBlackberryQWERTY(const std::string &name) { diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 5b6c27b0da..e0b9804a40 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -97,7 +97,7 @@ bool isJailed; // Really need to clean this mess of globals up... but instead I add more :P bool g_TakeScreenshot; - +static bool isOuya; recursive_mutex pendingMutex; static bool isMessagePending; static std::string pendingMessage; @@ -420,6 +420,9 @@ void NativeInit(int argc, const char *argv[], } else { screenManager->switchScreen(new LogoScreen(boot_filename)); } + + std::string sysName = System_GetProperty(SYSPROP_NAME); + isOuya = KeyMap::IsOuya(sysName); } void NativeInitGraphics() { @@ -631,16 +634,21 @@ void NativeTouch(const TouchInput &touch) { } void NativeKey(const KeyInput &key) { + // ILOG("Key code: %i flags: %i", key.keyCode, key.flags); g_buttonTracker.Process(key); if (screenManager) screenManager->key(key); } void NativeAxis(const AxisInput &key) { + // ILOG("Axis id: %i value: %f", (int)key.axisId, key.value); if (key.axisId >= JOYSTICK_AXIS_ACCELEROMETER_X && key.axisId <= JOYSTICK_AXIS_ACCELEROMETER_Z) { // Disable accelerometer as an axis for now. return; } + if (isOuya && key.axisId >= JOYSTICK_AXIS_OUYA_UNKNOWN1 && key.axisId <= JOYSTICK_AXIS_OUYA_UNKNOWN4) { + return; + } if (screenManager) screenManager->axis(key); } diff --git a/native b/native index c3247cfdc7..cff2711a7c 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit c3247cfdc7241a473dbfa6f015a045456070acb9 +Subproject commit cff2711a7c087edea398ae98dd245ae094bc17c6