ebiten/internal
divVerent 10c1b56e62
cmd/ebitenmobile: fix Xbox-ish gamepad axis assignment (#2596)
This commit mirrors https://github.com/libsdl-org/SDL/pull/7405
(6f1f586086).

Note that for SDL, this code is used a lot less than for Ebitengine, as SDL
mostly migrated to HIDAPI and direct USB device access rather than using
Android's APIs. For Bluetooth devices, however, the Java APIs are used the
same way.

This was the remaining problem to be solved to automatically support standard
layout on most standard gamepads (this should cover most Xbox-ish and PS-ish
gamepads on the market).

In particular this covers gamepads with the following assignment:

- Left stick = X/Y, right stick = Z/RZ, triggers = LEFTTRIGGER/RIGHTTRIGGER
  (which basically is what Android docs say and some PS gamepads do)

- Left stick = X/Y, right stick = RX/RY, triggers = Z/RZ
  (Xbox gamepad style, apparently)

- Left stick = X/Y, right stick = RX/RY, triggers = LEFTTRIGGER/RIGHTTRIGGER
  (Not sure if this exists, but it's conceivable)

As we found on the SDL pull request discussion, gamepads that offer flight
controls (e.g. THROTTLE and RUDDER) will likely not work well, before and
after this change.

Closes #2557
2023-03-12 22:32:30 +09:00
..
affine internal/affine: refactoring: use slices instead of array pointers 2022-09-30 22:20:32 +09:00
atlas internal/atlas: improve tests 2023-03-02 20:16:26 +09:00
buffered internal/buffer: refactoring 2023-02-26 02:20:07 +09:00
builtinshader internal/builtinshader: fix comments 2022-10-10 13:14:37 +09:00
clock all: update URLs in comments 2022-11-21 01:46:50 +09:00
cocoa all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
debug all: replace interface{} with any (#2430) 2022-11-03 15:33:09 +09:00
devicescale all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
file ebiten: implement DroppedFiles to replace AppendDroppedFiles 2023-01-25 14:27:11 +09:00
gamepad internal/gamepad: native standard layout for Linux (#2587) 2023-03-04 01:47:24 +09:00
gamepaddb cmd/ebitenmobile: fix Xbox-ish gamepad axis assignment (#2596) 2023-03-12 22:32:30 +09:00
glfw ebiten: add AppendDroppedFiles 2023-01-22 17:22:25 +09:00
goglfw internal/goglfw: use platform agnostic functions for context_windows.go (#2570) 2023-02-10 02:35:17 +09:00
graphics all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
graphicscommand all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
graphicsdriver internal/graphicsdriver/metal: bug fix: a path for CoreGraphics.framework didn't work 2023-03-10 23:24:06 +09:00
hooks internal/hooks: Enable to return error at suspend/resume audio 2021-05-04 23:09:01 +09:00
jsutil all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
microsoftgdk internal/microsoftgdk: improve forward compatibility 2022-12-25 22:00:22 +09:00
mipmap internal/graphics: use flatten []float32 slice instead of [][]float32 2022-12-03 20:23:58 +09:00
packing internal/packing: fix the comment 2023-02-28 21:45:58 +09:00
png all: remove old // +build comments (#2431) 2022-11-03 12:55:14 +09:00
processtest internal/processtest: use a semaphore for sub-tests 2023-02-25 16:19:15 +09:00
restorable internal/restorable: refactoring 2023-03-10 22:29:59 +09:00
shader internal/shader: bug fix: check the type for composite literal 2023-02-20 23:07:11 +09:00
shaderir all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
testing internal/testing: add the default exit code 1 2022-10-02 18:16:16 +09:00
thread all: separate the rendering thread from the main thread 2022-12-30 22:57:34 +09:00
ui internal/ui: bug fix: a big-offscreen size could be 0 2023-03-03 22:34:43 +09:00
vibrate all: remove old // +build comments (#2431) 2022-11-03 12:55:14 +09:00