Commit Graph

6015 Commits

Author SHA1 Message Date
Hajime Hoshi
e650e71d8c audio/internal/readerdriver: Bug fix: ReadFull could get stuck
If the source io.Reader's implementation is not good (e.g., Read
returns 0 if the buffer size is not multiples of 4), io.ReadFull
gets stuck forever. Instead, use reguler Read with a decent amount
of bytes buffer.

Closes #1599
2021-04-20 01:29:15 +09:00
Hajime Hoshi
5b96439fed Revert "examples/audiopanning: Bug fix: Out of range at reading bytes"
This reverts commit b1545b115c.

Reason: Calling UnreadByte twice is illegal

Updates #1598
2021-04-20 00:20:21 +09:00
Hajime Hoshi
146678596b audio/internal/readerdriver: Bug fix: Invoke onReady for go2cpp
Updates #1599
2021-04-19 23:59:31 +09:00
Hajime Hoshi
ea9d64f5b8 audio: Bug fix: Need to call setReady from the reader player side
Updates #1599
2021-04-19 23:56:08 +09:00
Hajime Hoshi
b1545b115c examples/audiopanning: Bug fix: Out of range at reading bytes
Closes #1598
2021-04-19 22:06:00 +09:00
Hajime Hoshi
7e1943dba7 Revert "ebiten: Do not skip Draw when vsync is disabled"
This reverts commit 7dda2d8e4b.

Reason: #1595: FPS doesn't match with the number of Draw calls per second when vsync is off.

Updates #1520
Closes #1595
2021-04-19 11:34:59 +09:00
Hajime Hoshi
dcaa1f9722 internal/uidriver/glfw: Bug fix: Need to reregister the callback after recreating the window
Updates #1588
Closes #1593
2021-04-19 01:28:59 +09:00
Hajime Hoshi
73f90f324f ebiten: Bug fix: ForceUpdate could be called before initialization
Closes #1591
2021-04-19 00:35:32 +09:00
Hajime Hoshi
2f451e6014 examples/windowsize: Enable to specify either maxwindowsize or minwindowsize 2021-04-18 23:21:34 +09:00
Hajime Hoshi
5cc8d8476b ebiten: Bug fix: Ignore the outside size when they are 0 at Layout
Closes #1589
2021-04-18 23:02:31 +09:00
Hajime Hoshi
fd80583dd0 internal/uidriver/glfw: Bug fix: Defer SetIcon on the fullscreen mode
Closes #1587
2021-04-18 22:28:01 +09:00
Hajime Hoshi
7e61189c3d internal/uidriver/glfw: Bug fix: Avoid registring C callbacks too often
Instead of registring/unregistering callbacks, use a boolean flag.

Closes #1588
2021-04-18 22:07:29 +09:00
Hajime Hoshi
c88ee0d0ad internal/uidriver/glfw: Bug fix: Unregister SetSize callback when undecorate the window
Closes #1586
2021-04-18 21:24:56 +09:00
Hajime Hoshi
f5a4216434 internal/uidriver/glfw: Bug fix: Do not call setWindowSize on iconifying
The window size might be 0 after iconifying. An iconified window is
invisible to users so setting a window size doesn't make sense anyway.

Closes #1585
2021-04-18 21:06:04 +09:00
Hajime Hoshi
26432dfc9e Revert "internal/uidriver/glfw: Refactoring: use glfw.Window when possible"
This reverts commit 475453d5d2.

Reason: #1584: A wrong active monitor was detected at the initial phase?

Closes #1584
2021-04-18 20:05:37 +09:00
Hajime Hoshi
45642668f7 examples/cursor: Change the background colors
On Windows, cursor colors are determined based on the background
color, and if the background color is gray, the cursor might be
invisible. This change adjust the color so that the cursor should
be visible in any cases.

Closes #1583
2021-04-18 19:34:53 +09:00
Hajime Hoshi
78732d93f6 internal/uidriver/glfw: Bug fix: Crash on some operations on native fullscreen mode (macOS)
This change forbids some operations when the wiindow is natively
fullscreened on macOS in order to avoid crashes.

Closes #1578
2021-04-18 18:11:33 +09:00
Hajime Hoshi
fda1fd9a95 internal/uidriver/glfw: Bug fix: FramebufferSize callback was not called when the window size was not changed
Closes #1580
2021-04-18 15:22:51 +09:00
Hajime Hoshi
61c0908b13 internal/glfw: Refactoring 2021-04-18 03:33:01 +09:00
Hajime Hoshi
81ef20ddd0 examples: Use the new keys
Updates #1394
2021-04-18 01:13:20 +09:00
Hajime Hoshi
1b70901659 examples/windowsize: Swap arrow keys for resizing 2021-04-18 01:07:09 +09:00
Hajime Hoshi
f09cf7fa47 internal/uidriver/glfw: Bug fix: Crash at Iconify
This is the same reason as Maximize.

Updates #1576
2021-04-18 01:03:13 +09:00
Hajime Hoshi
b5d4c834b8 internal/uidriver/glfw: Bug fix: More precise window size adjustment
Before this change, setWindowSize converts the size in device-
independent pixels once, invokes adjustWindowSizeBasedOnSizeLimitsInDP,
and then restore the values in device-dependent pixels. This might
introduce a slight error and then SetSize be unexpectedly invoked.
Such SetSize call with a slightly different size might not invoke
the FramebufferSize callback, and then this blocked forever when
maximizing the window.

This change fixes this by adjusting the size limits instead of the
window size so that the window size is not modified unexpectedly.

Closes #1577
2021-04-18 00:56:37 +09:00
Hajime Hoshi
d6ab27a5a2 internal/uidriver/glfw: Bug fix: Crash at Restore
This is the same reason as Maximize.

Updates #1576
2021-04-18 00:10:40 +09:00
Hajime Hoshi
37944d67c4 internal/uidriver/glfw: Update comments
Updates #1576
2021-04-18 00:05:48 +09:00
Hajime Hoshi
ab8477a21a internal/uidriver/glfw: Bug fix: Crash on Maximize
At least on macOS, Maximize invokes the SetSize callback in the game's
Update. This change fixes this issue by unregisting the callback
temporarily like what #1505 did.

Closes #1576
2021-04-18 00:02:58 +09:00
Hajime Hoshi
2661c769ef ebiten: Update comments 2021-04-17 22:22:51 +09:00
Hajime Hoshi
ed4dded094 examples/hsv, examples/hue: Use wider screens 2021-04-17 22:10:14 +09:00
Hajime Hoshi
c950e03fb1 examples/blocks/blocks: Use gamepads to go back to the title 2021-04-17 21:55:58 +09:00
Hajime Hoshi
b604391b21 Bug fix: compile error 2021-04-17 20:31:10 +09:00
Hajime Hoshi
c65920f3f9 Update dependencies 2021-04-17 20:30:10 +09:00
Hajime Hoshi
f62576d88d internal/glfw: Add tools.go to keep go.sum 2021-04-17 20:24:39 +09:00
Hajime Hoshi
855edcd2ff internal/glfw: Update Dockerfile and regenerate DLLs 2021-04-17 20:11:10 +09:00
Hajime Hoshi
c8ed6ec12e examples/keyboard/keyboard: go generate 2021-04-17 19:30:04 +09:00
Hajime Hoshi
6df87a0383 internal/uidriver: Add comments
Updates #1575
2021-04-17 18:17:26 +09:00
Hajime Hoshi
1ca0ecc10f internal/devicescale: Add comment about #1573
Updates #1573
2021-04-17 18:14:26 +09:00
Hajime Hoshi
150b780ebe ebiten: Add comments about #1575
Updates #1575
2021-04-17 17:33:33 +09:00
Hajime Hoshi
54ac6bed1e ebiten: Refactoring 2021-04-17 17:30:48 +09:00
Hajime Hoshi
161b1965ba ebiten: Refactoring: Call (*Window).SetPosition even before the run loop 2021-04-17 17:19:36 +09:00
Hajime Hoshi
deba352384 internal/uidriver/glfw: Prefer currentMonitor to get the monitor at deviceScaleFactor 2021-04-17 17:03:50 +09:00
Hajime Hoshi
e89f53774c internal/uidriver/glfw, internal/devicescale: Add comments 2021-04-17 15:45:46 +09:00
Hajime Hoshi
585f173d1c internal/uidriver/glfw: Bug fix: Treat pixel units correctly
Updates #1385
2021-04-17 04:43:33 +09:00
Hajime Hoshi
99b2b5c1ee internal/glfw: Bug fix: compile error on Windows
Updates #1385
2021-04-17 04:24:19 +09:00
Hajime Hoshi
9b6ba5ed2c ebiten: Add {Set,}WindowSizeLimits
Closes #1385
2021-04-17 03:58:06 +09:00
Hajime Hoshi
5255a54e20 ebiten: Fix the comment about SetCursorMode (again)
Updates #1572
2021-04-16 11:57:53 +09:00
Hajime Hoshi
ad8830d2b7 ebiten: Fix the comment about SetCursorMode
Updates #1572
2021-04-16 03:27:52 +09:00
Hajime Hoshi
4cbbdbf518 internal/uidriver/js: Misspelling 2021-04-16 03:14:46 +09:00
Hajime Hoshi
20705d63a3 internal/uidriver/js: Refactoring 2021-04-16 03:13:12 +09:00
Hajime Hoshi
ead84553a0 internal/uidriver/js: Implement CursorModeCaptured
Closes #1572
2021-04-16 03:09:24 +09:00
Hajime Hoshi
3c1226a227 internal/uidriver/js: Bug fix: SetCursorMode didn't work 2021-04-16 01:21:48 +09:00