Commit Graph

10357 Commits

Author SHA1 Message Date
Hajime Hoshi
fe970e1b68 internal/ui: bug fix: Monitor.Size should reflect the display orientation
Closes #3339
2025-11-13 08:54:09 +09:00
Hajime Hoshi
2ce2a82c14 cmd/ebitenmobile: add an option to save GPU resources at suspendGame
This is a kind of partial revert of suspendGame, as now saving GPU
resources at suspendGame is not done by default. It's because saving
GPU resouces could cause ANRs. A developer can do saving by passing
true at suspendGame explicitly.

Updates #3334
v2.10.0-alpha.6
2025-11-12 17:43:19 +09:00
rustversion
fe9ab4a12b all: fix the inconsistent method names in the comments (#3342)
Signed-off-by: rustversion <rustverion@outlook.com>
2025-11-10 13:42:37 +09:00
Hajime Hoshi
2eddff9dd8 all: update dependencies v2.10.0-alpha.5 2025-11-04 18:43:58 +09:00
Hajime Hoshi
990db0b609 cmd/ebitenmobile: bug fix: compilation failure EbitenSurfaceView.java 2025-11-02 15:53:35 +09:00
Hajime Hoshi
90856311d2 cmd/ebitenmobile: do not call saveGPUResources when onPause is already called
Updates #3334
2025-11-02 15:02:20 +09:00
Hajime Hoshi
3533c9a2a0 internal/graphicsdriver/opengl/gl: bug fix: always use OpenGL non-ES for Steam
Apparently, OpenGL ES caused an issue where Steam overlay didn't
work correctly. We are not sure the root cause, but there are similar
issues reported [1][2].

With Steam, it should be fine to assume that OpenGL non-ES is always
available.

Closes #3338

[1] https://github.com/ValveSoftware/steam-for-linux/issues/8122
[2] https://github.com/godotengine/godot/issues/53352
2025-11-02 02:59:15 +09:00
Hajime Hoshi
a1853bbc7c internal/atlas: use atomic.Bool for needToRestoreGPUResources 2025-10-27 21:13:43 +09:00
Hajime Hoshi
2ad956d7c1 internal/atlas: do not wait for reading pixels from GPU to be finished
Updatse #3215
Updates #3334
v2.10.0-alpha.4
2025-10-27 18:01:13 +09:00
Hajime Hoshi
36f5d10e58 all: update dependencies 2025-10-27 12:38:22 +09:00
Hajime Hoshi
a8a21ba687 ebiten, vector: bug fix: race conditions
This change fixes these race conditions in

 * (*ebiten.Image).invokeUsageCallbacks concurrent invocations
 * (*ebiten.Image).usageCallbacks usages
 * vector.theCallbackTokens usages
 * vector's global shader initializations

Closes #3333
2025-10-21 03:24:21 +09:00
Hajime Hoshi
f0f0bb339d all: use errors.Join to catch all possible errors
Closes #3332
2025-10-17 23:39:13 +09:00
Hajime Hoshi
5f08f4ae1d vector: bug fix: FillRect or other utility functions on a sub-image didn't work correctly
Closes #3330
2025-10-15 20:17:07 +09:00
Hajime Hoshi
cc905a0c39 exp/textinput: bug fix: do not ignore a keyup event even if isComposing=true
When an IME starts, the key events can be fired like this:

  1. `keydown` code=KeyA isComposing=false
  2. `compositionstart`
  3. `keyup` code=KeyA isComposing=true

Before this change, KeyA's keyup event was not treated in this case,
and the key was considered to be pressed forever.

This change fixes this issue by always treating keyup events even
if isComposing=true.

Closes #3328
2025-10-11 23:34:37 +09:00
Hajime Hoshi
81908d51d6 internal/atlas: bug fix: deadlock at RestoreGPUResources
Updates #3327
v2.10.0-alpha.3
2025-10-10 19:19:33 +09:00
Hajime Hoshi
7a30e6be6b internal/atlas: skip saving GPU resources when it is already saved
If the GL thread is already suspended, this would cause a dead lock.
This fix mitigates this issue by checking the save state.

Updates #3327
2025-10-10 19:00:10 +09:00
Hajime Hoshi
07f60cc39a internal/atlas: bug fix: skip SaveGPUResources when a frame doesn't start
Closes #3327
2025-10-10 18:32:39 +09:00
Hajime Hoshi
371607544a cmd/ebitenmobile: save GPU resources at onPause and restore GPU resources on context lost
This change adds a logic to save GPU resources at GLSurfaceView.onPause
as a precaution, and restore GPU resources from it when a context lost
happens. This can fix issues where a context lost often occurs when an
interstitial ad is shown.

This change doesn't add any new APIs and do this resource reservation
automatically.

Closes #3215
v2.10.0-alpha.2
2025-10-10 16:26:56 +09:00
Hajime Hoshi
549a80d42f internal/atlas: refactoring move extending an image to atlas 2025-10-08 23:09:22 +09:00
Hajime Hoshi
e92594ef19 internal/ui: bug fix: consecutive releasing should not affect Is*JustReleased
Closes #3326
2025-10-08 20:29:53 +09:00
Hajime Hoshi
9b74dded6d all: update PureGo to v0.10.0-alpha.2 2025-10-08 03:56:53 +09:00
Hajime Hoshi
55dfc79bfd vector: remove (*Path).ApplyGeoM
This was added in v2.9 and deprecated at the same time. Let's remove
this.

Updates #3266
v2.10.0-alpha.1
2025-10-05 23:46:19 +09:00
Hajime Hoshi
9a69acc8dd ebiten: update comments about DroppedFiles
Updates #3084
2025-10-05 14:13:24 +09:00
Hajime Hoshi
150189a985 exp/textinput: add comments
Updates #3324
2025-10-05 13:31:32 +09:00
Hajime Hoshi
861b2b6b81 exp/textinput: bug fix: a rendered text was not updated when a compositing text is empty
Closes #3324
2025-10-05 13:30:53 +09:00
Hajime Hoshi
5eeeaa94e2 all: v2.10.0-alpha released v2.10.0-alpha 2025-10-04 23:05:23 +09:00
Hajime Hoshi
5e1cb7ca03 internal/graphicsdriver/opengl/gl: bug fix: the generator output a wrong Go file 2025-10-04 22:59:02 +09:00
Hajime Hoshi
c177137013 all: update dependencies 2025-10-04 15:56:24 +09:00
Hajime Hoshi
2912b1b8ce all: update bitmapfont to v4.1.0 2025-10-04 14:50:05 +09:00
Hajime Hoshi
af106a0f3f mobile/ebitenmobileview: bug fix: UIPressPhaseMoved doesn't exist
Also, this change ignores UIPressPhaseStationary.
2025-09-26 23:09:48 +09:00
Hajime Hoshi
b4eb3a6faf mobile/ebitenmobileview: bug fix: wrong iOS constants were used 2025-09-26 22:34:17 +09:00
Hajime Hoshi
55bb572a27 inpututil: bug fix: {Key,MousePress}KeyDuration returned a wrong value on browsers and mobiles
Closes #3322
2025-09-26 22:33:54 +09:00
Hajime Hoshi
9666878ad5 internal/inpututil: bug fix: {Key,MouseButton}PressDuration returned a wrong value on desktops
Closes #3322
2025-09-26 22:09:23 +09:00
Hajime Hoshi
7cdf125cbb exp/textinput: adjust selection range at Set(TextAnd)Selection 2025-09-26 21:55:47 +09:00
Hajime Hoshi
7ca3a68eb4 internal/ui: handle an error when navigator.keyboard.getLayoutMap() fails 2025-09-24 22:55:30 +09:00
Hajime Hoshi
8d421df739 internal/ui: bug fix: move handling mod keys to ui.InputState
Closes #3320
2025-09-24 04:57:33 +09:00
Hajime Hoshi
7de26d3a30 all: update gomobile 2025-09-23 18:43:39 +09:00
Hajime Hoshi
27b6b3c633 internal/ui: bug fix: key/mouse button inputs were sometimes missed
If a key down and a key up happened in one tick, Ebitengine ignored
these events and users failed to notice the key press. This was
problematic in real world use caess, e.g. click by a tap on macOS
browsers.

This change fixes this issue by recording the tick for both a press
and a release, and determine whether the key/button is pressed or
not more precisely.

Updates #2898
Closes #3137
Closes #3249
Updates #3317
2025-09-23 18:04:39 +09:00
Hajime Hoshi
c15408bc6e internal/ui: update key/mousebutton states at event handlers instead of updateInputStateImpl
This is a preparation for more precise key state detections and
asynchronous event handlers.

Updates #1704
Updates #3249
2025-09-23 15:32:19 +09:00
Hajime Hoshi
74835fb5bd all: add #cgo optimization directives
Closes #3196
2025-09-22 12:27:34 +09:00
Hajime Hoshi
5afdb9588f internal/atlas: replace runtime.SetFinalizer with AddCleanup
Closes #3204
2025-09-22 01:52:06 +09:00
Hajime Hoshi
4daa59b2cd internal/atlas: do not access global variable references at deallocate
As deallocate is invoked from the finalizer, it is problematic to access
a global variable referring the object itself. Especially,
runtime.AddCleanup doesn't work well with the current deallocate
implmenentation.

This change removes the access to the global variables from deallocate.
The global variables are reset every frame so it is self not to
remove a deallocated image explicitly. Also, this change fixes
the logic to iterate the global variables' images to check if the
image is already deallocated or not.

Updates #3204
2025-09-22 00:18:20 +09:00
Hajime Hoshi
765193a40e internal/atlas: refactoring: rename smallImageSet to imageSmallSet and use slices.Delete 2025-09-21 23:51:59 +09:00
Hajime Hoshi
51cc3aed04 all: replace runtime.SetFinalizer with AddCleanup
Updates #3204
2025-09-21 23:14:53 +09:00
Hajime Hoshi
244510643c ebiten: keep TouchID int by using a generics function 2025-09-21 18:48:41 +09:00
Hajime Hoshi
6aa208e15e ebiten: refactoring: add internal/inputstate
internal/inputstate will be accessed from inpututil in the future.

Updates #3249
2025-09-21 18:37:27 +09:00
Hajime Hoshi
97e145a493 all: update Oto to v3.4.0-alpha.11 2025-09-21 01:00:27 +09:00
Hajime Hoshi
77a8c30ca8 internal/file: add VirtualFS.ReadDir and FileEntryFS.ReadDir
Closes #3084
2025-09-20 19:24:39 +09:00
Hajime Hoshi
fa51d1d012 examples/dropfile: use slog 2025-09-20 18:56:23 +09:00
Hajime Hoshi
6d949e119f audio: bug fix: the audio source for testing was too short
Closes #3216
2025-09-20 16:41:18 +09:00