On macOS, a window is hidden until buffers are swapped once. If a game is
not runnable on unfocused, as the window is hidden and unfocused, the
waiting loop for a window never ends.
This change fixes the issue by changing the loop condition.
Closes#2620
This is basically a revert for bf63d2310d.
As anti-alias options are added to the vector package's functions, we
should be able to emulate the same thing without performance penalty.
Updates #2605
Updates #2606
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
pixelsForRestore was removed at 09e0320309
as the regions for restoring were minimized. However, this caused a
regression and increased allocations on Android.
This fix revives pixelsForRestore, but as a map with region keys and
byte slice values. pixelsForRestore no longer represents a byte slice
for an entire image.
Updates #2375
ReadElements is a new function as of v2.5, but at the same time,
the colorm package is also added in v2.5. As ebiten.ColorM is
deprecated, ebiten's ColorM.ReadElements should not be requried.
Closes#2347