mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
TouchInput::id was used directly to index the global primaryButton[] array (MultiTouchButton::Touch) and to shift pointer bitmasks (PSPDpad/PSPStick/PSPCustomStick/GestureGamepad::Touch), guarded only by a debug-only assert in one of the five call sites - a no-op in release builds. input.id isn't always a small sequential slot in [0, TOUCH_MAX_POINTERS): SDL assigns SDL_FingerID values directly, Android pointer IDs can go up to 31, and UWP's TouchMapper allocates one more slot (11) than TOUCH_MAX_POINTERS (10) and can also return -1 when it runs out of slots - all reachable through ordinary multi-touch use, no malicious input required. Also apply bounds check to the PER_GAME gesture config ints (iDoubleTapGesture/iSwipeUp/Down/Left/Right) before indexing GestureKey::keyList[] with them. Additionally, minor cleanup on Android and moves the TouchMapper helper out from UWP to InputState.h.
================================================================ NOTE: These are legacy instructions for building using ndk-build. We mostly only use this on CI because it's faster than gradle. There might also be some holdouts around still using eclipse. ================================================================ First, build the C++ static library: > cd android > ./ab.sh Or > ./ab.cmd as appropriate. Start Eclipse, import the android directory as an existing project You need to also load the "native" project into your eclipse workspace Build and run. If you modify the C++ code, you need to rebuild the static library, of course. To get Eclipse to understand that you have in fact changed something if you haven't also changed any Java code, just add a space character to PPSSPPActivity.java, or right click the project and choose Refresh, and then relaunch the app on the device. A real Android device is strongly recommended for testing. Don't trust the emulator.