Commit Graph

10312 Commits

Author SHA1 Message Date
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
Hajime Hoshi b95fd09783 all: update dependencies 2025-08-14 02:34:44 +09:00
Hajime Hoshi e67f7e3ae2 .github/workflows: update Go to 1.25 2025-08-13 12:46:58 +09:00
Hajime Hoshi 5f9abccb0d all: update github.com/gen2brain/mpeg to v0.5.0 2025-08-12 21:05:48 +09:00
Hajime Hoshi 135a8a899c all: update Oto
This addresses #3297 where audio unexpectedly resumed when coming
back from sleep on macOS.

Closes #3297
2025-08-11 20:20:39 +09:00
iliya 3649b03ef2 ebiten: improve clarity and grammar in documentation comments (#3299)
Updated several documentation comments in run.go to improve clarity, fix grammatical errors, and enhance readability. No functional code changes were made.
2025-08-11 13:51:10 +09:00
Hajime Hoshi a9d83e49d9 all: update bitmapfont 2025-08-11 13:20:40 +09:00
Hajime Hoshi 3c87f72903 .github/workflows: update Go versions to 1.25.0-rc.3 2025-08-10 18:05:53 +09:00
iliya e1a7fd1eab all: replace errors.New(fmt.Sprintf()) with fmt.Sptrinf() (#3293)
Updated panic statements to use fmt.Sprintf instead of fmt.Errorf when formatting error messages in SetPixelFormat and SetMaximumDrawableCount. This avoids unnecessary error object creation and directly formats the string for panic.
2025-08-10 17:54:43 +09:00
iliya b276393b53 examples/doom: refactor fire pixel update loops and intensity logic (#3295)
Replaced for-loops in updateFirePixels with range-based loops for clarity. Simplified newI calculation in updateFireIntensityPerPixel using max().
2025-08-10 17:42:45 +09:00
iliya b262191c79 examples: Refactor loops to use range in example files (#3294)
Replaces traditional for-loop constructs with 'for range' syntax in several example files for improved readability and idiomatic Go style. Affects contextlost, keyboard, mandelbrot, masking, moire, and noise examples.
2025-08-10 17:30:54 +09:00
iliya fb6cac2882 all: replace deprecated image.ZP and image.ZR usages (#3291)
Updated code to use image.Point{} instead of image.ZP and image.Rectangle{} instead of image.ZR, as the former are deprecated. This improves code clarity and future compatibility.
2025-08-10 16:06:34 +09:00