mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
Android: Fix multi-touch detection
This commit is contained in:
+1
-2
@@ -36,13 +36,12 @@ cd xsystem35-sdl2/android
|
||||
## How to use
|
||||
1. Create a ZIP file containing all the game files (`*.ALD`) and [configuration files](https://haniwa.technology/games/preparing-a-game-directory.html), and transfer it to your device.
|
||||
2. When you start the app, a file chooser opens. Select the zip file.
|
||||
3. The game starts.
|
||||
3. The game starts. Two-finger touch is treated as a right click.
|
||||
4. Game data persists in the app's internal storage. Use the device's Settings app if you want to clear it (eg. before installing another game).
|
||||
|
||||
Note that this Android port is still in early development; see below.
|
||||
|
||||
## TODO
|
||||
- Right-click emulation
|
||||
- Save / Load support
|
||||
- Better launcher
|
||||
- MP3 / MIDI BGM support (currently only ogg is supported)
|
||||
|
||||
+2
-2
@@ -162,7 +162,7 @@ static void sdl_getEvent(void) {
|
||||
break;
|
||||
|
||||
case SDL_FINGERDOWN:
|
||||
if (SDL_GetNumTouchFingers(SDL_GetTouchDevice(0)) >= 2) {
|
||||
if (SDL_GetNumTouchFingers(e.tfinger.touchId) >= 2) {
|
||||
mouseb &= ~(1 << SDL_BUTTON_LEFT);
|
||||
mouseb |= 1 << SDL_BUTTON_RIGHT;
|
||||
RawKeyInfo[mouse_to_rawkey(SDL_BUTTON_LEFT)] = FALSE;
|
||||
@@ -176,7 +176,7 @@ static void sdl_getEvent(void) {
|
||||
break;
|
||||
|
||||
case SDL_FINGERUP:
|
||||
if (SDL_GetNumTouchFingers(SDL_GetTouchDevice(0)) == 0) {
|
||||
if (SDL_GetNumTouchFingers(e.tfinger.touchId) == 0) {
|
||||
mouseb &= ~(1 << SDL_BUTTON_LEFT | 1 << SDL_BUTTON_RIGHT);
|
||||
RawKeyInfo[mouse_to_rawkey(SDL_BUTTON_LEFT)] = FALSE;
|
||||
RawKeyInfo[mouse_to_rawkey(SDL_BUTTON_RIGHT)] = FALSE;
|
||||
|
||||
Reference in New Issue
Block a user