Hajime Hoshi
4fb27adb9d
internal/ui: remove an old comment
...
Now Ebitengine allows to specify the initial monitor, having an
initial monitor is no longer a hack.
Updates #1575
Updates #1835
2023-09-24 19:24:23 +09:00
Hajime Hoshi
b5d0dc3686
internal/ui: change the initial window position adjustment
...
The window position should be posible if possible.
2023-09-24 19:07:21 +09:00
Hajime Hoshi
a23efac01c
internal/ui: refactoring: reduce member variables
2023-09-24 19:05:56 +09:00
Hajime Hoshi
c16bd1e249
internal/ui: refactoring: unify duplicated logics to initialize the window size and position
2023-09-24 18:55:45 +09:00
Hajime Hoshi
b95228a8a6
all: rename arguments in Kage
...
Closes #2767
2023-09-24 16:46:36 +09:00
Hajime Hoshi
915ed48f7a
internal/graphicsdriver/metal/mtl: bug fix: fail to resolve Metal.framework path with Xcode 15
...
Updates #2732
Closes #2784
2023-09-24 16:15:54 +09:00
Hajime Hoshi
c7d1d28582
internal/ui: move impls for device scale to internal/ui for desktops
...
This enables to remove restrictions for some functions to be called
from the main thread.
Updates #2423
2023-09-24 15:44:41 +09:00
Hajime Hoshi
458a415131
internal/ui: move impls for device scale to internal/ui for mobiles
2023-09-24 15:29:14 +09:00
Hajime Hoshi
b243dc0649
internal/devicescale: bug fix: this package cannot be compiled with GOOS=js
2023-09-24 03:35:54 +09:00
Hajime Hoshi
506a1de259
internal/ui: refactoring: move device-scale implementation to internal/ui for browsers
...
The returned value from internal/devicescale.At never changes for
browsers, so the detection of devicePixelRatio updates didn't work
in the first place. Also, there is not a good way to detect the
change [1].
This change moves the logic from internal/devicescale to internal/ui.
We aim to merge these packages as a device scale factor belongs to
a monitor and internal/ui manages monitors.
[1] https://crbug.com/123694
2023-09-24 03:19:31 +09:00
Hajime Hoshi
5d5e3c7c0b
internal/ui: refactoring: replace *glfw.Monitor with *Monitor
2023-09-24 02:39:53 +09:00
Hajime Hoshi
f72b8a4ced
internal/ui: refactoring: remove redundant Monitor members
2023-09-24 01:58:07 +09:00
Hajime Hoshi
121d6005cd
internal/ui: remove (*Monitor).Bounds
...
Updates #2780
2023-09-24 01:46:14 +09:00
Hajime Hoshi
01e2c92e56
internal/ui: remove unnecessary code
...
This was an old code when Ebitengine created a dummy invisible
window before creating the main window.
2023-09-24 01:42:39 +09:00
Hajime Hoshi
69e3a2b974
internal/ui: refactoring: (*monitors).update must be called from the main thread
...
In the current implementation, (*monitors).update is not called
from other threads, but the current code is fragile.
2023-09-24 01:37:11 +09:00
Hajime Hoshi
7664647ad1
internal/ui: bug fix: needed to wait before entering into fullscreen
...
Just after moving a window to another monitor, waiting a little while
was required before entering into fullscreen.
Closes #2778
2023-09-23 19:02:36 +09:00
Hajime Hoshi
4ef98b3ea9
internal/ui: bug fix: wrong calculation of the initial window position
...
Updates #2778
2023-09-23 18:51:58 +09:00
Hajime Hoshi
b3058b68a0
ebiten: change the unit of (*Monitor).Bounds
...
Monitors can have different device scale factors, and in this case,
it doesn't make sense to use device-independent pixels as unit for
monitor positions and sizes.
Updates #2778
2023-09-23 17:58:23 +09:00
Hajime Hoshi
d736a8cff7
internal/ui: bug fix: GetVideoMode must not be called from othere threads
...
Now setInitMonitor can be called from any other threads than the main
thread. Do not call this.
This change fixes the issue by using *Monitor instead of *glfw.Monitor.
2023-09-23 17:30:18 +09:00
Hajime Hoshi
e0cd031aea
internal/ui: bug fix: replace initWindowMonitor usages with initMonitor
...
There were two similar member variables internalWindowMonitor and
initMonitor, and when SetMonitor is called, probably there were
some inconsitency between them.
This change fixes the issue by not using initWindowMonitor.
Closes #2779
2023-09-23 17:17:38 +09:00
Hajime Hoshi
2702c6b228
internal/processtest: suppress issue2475 test for Windows
...
The result seems flaky unfortunately.
2023-09-23 00:18:41 +09:00
Hajime Hoshi
0e27a8a30b
internal/shader: bug fix: spaces around a compiler directive should be allowed
...
Closes #2771
2023-09-22 01:45:11 +09:00
Hajime Hoshi
2f835a0ee2
internal/graphics: fix wrong comments
2023-09-21 01:59:20 +09:00
Hajime Hoshi
20ef839e03
all: rename arguments in Fragment
...
Updates #2767
2023-09-21 01:35:57 +09:00
Hajime Hoshi
2c8a2a584f
internal/gamepaddb: update the database
...
This adopts the commit e72ff9cb76
Closes #2766
2023-09-18 21:20:10 +09:00
Hajime Hoshi
0dcfa5f54b
Revert "internal/gamepaddb: update the database"
...
This reverts commit 4375fffcbe
.
Reason: test failures
2023-09-18 19:23:45 +09:00
Hajime Hoshi
4375fffcbe
internal/gamepaddb: update the database
...
This adopts the commit 8adb15e0a2
2023-09-18 19:07:01 +09:00
Hajime Hoshi
14f2ee198e
ebiten: add SetWindowMousePassthrough and IsWindowMousePassthrough
...
Closes #2511
2023-09-18 18:31:22 +09:00
Hajime Hoshi
c8d38f7f25
internal/glfw, interna/cglfw, internal/goglfw: add MousePassthrough
...
Work in progress
Updates #2511
2023-09-18 18:31:22 +09:00
Hajime Hoshi
777c575638
internal/goglfw: typo
...
Fortunately, this function is actually not called.
2023-09-18 18:30:43 +09:00
Hajime Hoshi
6f41a05264
Revert "internal/graphicsdriver/directx: remove tearing"
...
This reverts commit 78d3e4273b
.
Reason: tearing is potentially risky but needed for maximizing FPS.
Also, tearing is officially recommended by Microsoft (see [1])
Closes #2697
[1] https://github.com/microsoft/DirectX-Graphics-Samples/blob/master/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingHelloWorld/DeviceResources.cpp#L520
2023-09-18 03:30:34 +09:00
Hajime Hoshi
8a0aba45f5
internal/ui: update touches after the layout is determined on mobiles
...
Closes #2763
2023-09-17 21:56:26 +09:00
Hajime Hoshi
07d2706e63
internal/processtest: bug fix: allow some numerical errors for cursor positions
...
Updates #2475
2023-09-17 19:58:30 +09:00
Hajime Hoshi
fd689467c5
internal/processtest: add a test for capturing cursor and fullscreen
...
Updates #2475
2023-09-17 19:41:56 +09:00
Hajime Hoshi
02fd8cfb07
internal/ui: bug fix: preserve a captured cursor positions for toggling fullscreening for browsers
...
Closes #2475
2023-09-17 18:38:00 +09:00
Hajime Hoshi
a5aa721bda
internal/ui: update mouse and touch cursors after the layout is determined on browsers
...
Updates #2763
2023-09-17 16:30:47 +09:00
Hajime Hoshi
6ab509f221
internal/ui: reland: bug fix: preserve cursor positions for toggling fullscreening for desktops
...
Updates #2475
2023-09-17 15:54:39 +09:00
Hajime Hoshi
9d73e45677
Revert "internal/ui: bug fix: preserve cursor positions for toggling fullscreening for desktops"
...
This reverts commit 7ed4db90be
.
Reason: compile error on Windows
2023-09-17 15:43:38 +09:00
Hajime Hoshi
7ed4db90be
internal/ui: bug fix: preserve cursor positions for toggling fullscreening for desktops
...
Updates #2475
2023-09-17 15:26:08 +09:00
Hajime Hoshi
7becaa19e6
internal/ui: bug fix: native APIs must be called from the main thread
...
Updates #2763
2023-09-17 15:14:57 +09:00
Hajime Hoshi
0475baf9e2
internal/ui: update comments
...
Updates #2763
2023-09-17 14:59:43 +09:00
Hajime Hoshi
8c25b07336
internal/ui: call updateInputState after layoutGame
...
The cursor position is affected by the current layout. Then, input
states should be updated after layoutGame is called.
Updates #2763
2023-09-17 14:58:32 +09:00
Hajime Hoshi
a62b8a00e7
internal/ui: use float64 for cursor positions internally
2023-09-17 03:43:18 +09:00
Hajime Hoshi
226497a8a9
internal/cglfw: bug fix: Motif hints should be updated for functions and decorations at the same time
...
Updates #2289
Closes #2760
2023-09-17 00:40:17 +09:00
Hajime Hoshi
90ee615e00
internal/cglfw: disable a maximizing button when a max window size is specified
...
Closes #2289
2023-09-16 23:41:19 +09:00
Hajime Hoshi
7698ec0665
internal/cglfw: rename a file
...
Updates #2759
2023-09-16 23:17:17 +09:00
Hajime Hoshi
2737bd6d04
internal/cglfw: drop a native Wayland support
...
Closes #2759
2023-09-16 21:46:24 +09:00
Hajime Hoshi
45acc2c5d8
internal/ui: reland: bug fix: disable window size limitation on fullscreen
...
Closes #2260
2023-09-16 16:49:49 +09:00
Hajime Hoshi
40fc96d78c
internal/ui: forbid a green button when a max window size limit is specified
...
Updates #2260
2023-09-16 16:40:03 +09:00
Hajime Hoshi
128215eedd
Revert "internal/ui: bug fix: disable window size limitation on fullscreen"
...
This reverts commit 9a5ef1b553
.
Reason: we should disable the green button instead
Updates #2260
2023-09-16 03:23:34 +09:00