10323 Commits

Author SHA1 Message Date
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
Hajime Hoshi
a110d83acd internal/gamepaddb: update the database 2025-09-20 15:39:25 +09:00
Hajime Hoshi
0459d06eaa all: update PureGo to v0.9.0-alpha.11 2025-09-19 13:31:15 +09:00
Hajime Hoshi
4943d0e035 internal/ui: cache the monitor
`UserInterface.currentMonitor` seems a heavy function and takes about
1% CPU usage on MacBook M3 Pro. Cache the monitor object and use it.
The cache is invalidated after about one second, or the monitor is
missing.

This reduces CPU usages from about 6.5% to 5.5%

Updates #3318
2025-09-19 02:32:28 +09:00
Hajime Hoshi
cc7eac7ba6 all: update Oto 2025-09-18 16:18:42 +09:00
Hajime Hoshi
4bb016f262 internal/processtest/testdata: bug fix: skip issue2737 at GitHub Actions
An audio driver seems not found even on Windows.
2025-09-16 16:26:41 +09:00
Hajime Hoshi
9b1f5cbb6a all: update dependencies and drop Go 1.23 2025-09-16 15:24:16 +09:00
Hajime Hoshi
187c074ca1 vector: skip a flaky test for browsers 2025-09-06 04:06:11 +09:00
Hajime Hoshi
d234fdead6 vector: refactoring: remove unused functions 2025-09-06 03:16:45 +09:00
Hajime Hoshi
159eea683d vector: calculate the allowance value based on the size of a curve
This should improve the result of transforming a path with a
geometry matrix.

Updates #3311
2025-09-06 03:07:21 +09:00
Hajime Hoshi
793b869e73 vector: remove a hack at Close
This hack was introduced at 97ebef8298,
but it seems no longer needed.
2025-09-06 02:52:00 +09:00
Hajime Hoshi
be98d0111c vector: add test for GeoM with arcs
The issue was already fixed by fcd3719a9a

Closes #3311
2025-09-06 00:58:22 +09:00
Hajime Hoshi
fcd3719a9a vector: use radius to detect too close two points for ArcTo
Using a constant value is not good in the case when the path is
converted with a geometry matrix later.

Updates #3311
2025-09-06 00:45:22 +09:00
Hajime Hoshi
8c7417d07e vector: path 2025-09-06 00:27:02 +09:00
Hajime Hoshi
329fd15b10 internal/graphicsdriver/metal: use CAMetalDisplayLink for macOS
This should fix the flickering issue.

Closes #3278
v2.9.0-alpha.16
2025-09-05 00:20:48 +09:00
Hajime Hoshi
95f12febfd internal/ui: bug fix: crash when the screen size is 0
This changea void the crash by skipping to create a screen when
the specified size is 0 accidentally.

Closes #3121
2025-09-04 22:58:31 +09:00
Hajime Hoshi
fd1664adf9 all: update bitmapfont to v4.1.0-alpha.5 2025-08-29 17:23:24 +09:00
Hajime Hoshi
b03fa0532b internal/cocoa: remove unused APIs 2025-08-28 00:20:42 +09:00
Hajime Hoshi
b99bf14d09 internal/ui: refactoring: rename an argument 2025-08-28 00:19:57 +09:00
Hajime Hoshi
4a0468f29a internal/graphicsdriver/metal: refactoring 2025-08-27 23:23:23 +09:00
Hajime Hoshi
46fd8a1a52 internal/graphicsdriver/metal: separate command buffers into two
For efficiency, this change separatens the current command buffer
into two: for non-screen and for screen. It's because a drawable will
not be released as long as the CommandBuffer referencing it is alive,
it is more efficient to separate CommandBuffers that use the drawable
from those that do not.

Updates #3278
2025-08-27 13:05:21 +09:00
Hajime Hoshi
ecc1def58b internal/graphicsdriver/metal: refactoring: do not call SetMaximumDrawableCount every frame 2025-08-26 22:39:47 +09:00
Hajime Hoshi
84d4fd45ef internal/graphicsdriver/metal: fix the case when screenDrawable is nil
From the specification, screenDrawable can be nil when present is true.
2025-08-26 19:34:32 +09:00
Hajime Hoshi
a91cf1518f internal/graphicsdriver/metal: refactoring 2025-08-25 22:50:12 +09:00
Hajime Hoshi
f03b4b9524 internal/graphicsdriver/metal: add assertions 2025-08-25 20:04:38 +09:00
Hajime Hoshi
c830cf4c63 internal/graphicsdriver/metal: do not call PresentDrawable when CommandBuffer is empty
Before this fix, PresentDrawable could be invoked even when the
CommandBuffer was empty. This might cause the flickering issue #3278.

This is an experimental (but seemingly valid) fix.

Updates #3278
2025-08-25 18:39:56 +09:00
Hajime Hoshi
c3a43e057e internal/graphicsdriver/metal: refactoring 2025-08-25 18:31:11 +09:00
Hajime Hoshi
aa4c2e7267 Revert "internal/graphicsdriver/metal: add in-flight semaphore"
This reverts commit db9ca28598.

Reason: This didn't seem to change the situation.

Updates #3278
2025-08-25 18:14:55 +09:00
Jon Rafkind
3dc1c8b02b colorm: extra notes on how colorm operates (#3307) 2025-08-25 04:12:28 +09:00
Hajime Hoshi
e18437c213 all: update jakecoffman/cp to v2.3.0 2025-08-23 15:11:03 +09:00
Hajime Hoshi
db9ca28598 internal/graphicsdriver/metal: add in-flight semaphore
Closes #3278
v2.9.0-alpha.15
2025-08-19 14:08:42 +09:00
Hajime Hoshi
20872c1bd0 cmd/ebitenmobile: fix comments 2025-08-17 12:58:04 +09:00
Hajime Hoshi
a670a741c6 mobile/ebitenmobileview: terminate the process when ebiten.Termination is returned 2025-08-16 00:30:43 +09:00
Hajime Hoshi
e05aadc6ab internal/vibrate: typo 2025-08-14 17:39:37 +09:00
Hajime Hoshi
371a04f92f internal/vibration: bug fix: vibration doesn't work when touch feedback was muted
Calling `vibrate` without specifying the usage didn't work when the
global setting 'touch feedback' is 0. As the application's vibration
has nothing to do with touch feedbacks, this is an unexpected behavior.

Specify AudioAttributes or VibrationAttributes expcliitly.

Closes #3300
v2.9.0-alpha.14
2025-08-14 17:21:02 +09:00