Commit Graph

6163 Commits

Author SHA1 Message Date
Hajime Hoshi
44e96f2377 examples/resources/images: Add a license about alert.png 2021-05-04 18:17:17 +09:00
Hajime Hoshi
e1d0b902e1 examples/audio: Add buttons 2021-05-04 02:02:17 +09:00
Hajime Hoshi
11e76d3fc8 audio/vorbis: Catch the Seek error 2021-05-03 23:11:14 +09:00
Hajime Hoshi
fc5970768d audio/internal/go2cpp: Bug fix: Potential deadlock at Play
Closes #1629
2021-05-03 17:54:25 +09:00
Tom Lister
bea5ab3335
internal/uidriver/glfw: Native macOS implementation for setting cursor shape (#1624)
Updates #1624
2021-05-02 14:50:50 +09:00
Hajime Hoshi
7adf6aac27 audio/internal/readerdriver: Simplify type names 2021-05-01 16:25:40 +09:00
Hajime Hoshi
1acf5bc260 audio/internal/readerdriver: Bug fix: Compile error 2021-04-29 18:37:10 +09:00
Hajime Hoshi
760072e3a9 audio/internal/readerdriver: Use a channel instead of a callback function 2021-04-29 18:21:06 +09:00
Hajime Hoshi
b509ce523d internal/uidriver/js: Bug fix: SetFullscreen didn't work on Safari
Updates #1611
2021-04-28 23:28:58 +09:00
Tom Lister
5d3a76cbe6
internal/uidriver/js: Implement {Set,}Fullscreen for browsers (#1623)
Closes #1611
2021-04-27 23:58:32 +09:00
Hajime Hoshi
a716edc713 text: Add explanation about cache limit 2021-04-27 02:36:33 +09:00
Hajime Hoshi
3f97386d8e text: Improve the comment 2021-04-27 02:28:52 +09:00
Hajime Hoshi
cdf700ed84 text: Improve the comments 2021-04-27 02:20:10 +09:00
Hajime Hoshi
c5c12cbf68 text: Improve the comment 2021-04-27 01:59:39 +09:00
Hajime Hoshi
091e51ae4c internal/uidriver/glfw: Avoid allocating a new slice 2021-04-25 00:57:06 +09:00
Hajime Hoshi
e2ceb7b3a6 internal/uidriver/glfw: Call fromGLFWPixels from the main thread
fromGLFWPixels can invoke driverScaleFactor, and then using the main
thread is safer.
2021-04-24 23:30:51 +09:00
Hajime Hoshi
b6364c46fe internal/clock: Misspelling 2021-04-24 23:24:11 +09:00
Hajime Hoshi
2534b78755 internal/clock: Simplify the logic to calculate tick per frame
Updates #1444
Updates #1597
2021-04-24 23:06:27 +09:00
Hajime Hoshi
2e6ecc766d internal/clock: Integrate 'now' implementations
The Go runtime already uses QueryPerformanceCounter at runtime.nanotime.
2021-04-24 22:32:47 +09:00
Hajime Hoshi
011a524ac7 internal/clock: Update comments 2021-04-24 22:10:00 +09:00
Hajime Hoshi
e62eba387d audio/vorbis: Accept io.Reader instead of io.ReadSeeker
Closes #1621
2021-04-24 16:41:23 +09:00
Hajime Hoshi
68d24f1c62 audio/mp3: Accept io.Reader instead of io.ReadSeeker
Updates #1621
2021-04-24 16:39:49 +09:00
Hajime Hoshi
62899e5902 audio/wav: Accept io.Reader instead of io.ReadSeeker
Updates #1621
2021-04-24 16:35:28 +09:00
Hajime Hoshi
91f8347500 internal/uidriver/glfw: Avoid busy loop by sleeping
Updates #1580
2021-04-24 05:19:23 +09:00
Hajime Hoshi
798acc9757 Remove the badge for Travis CI 2021-04-24 03:54:15 +09:00
Hajime Hoshi
be065011dc Update the badge for pkg.go.dev 2021-04-24 03:52:45 +09:00
Hajime Hoshi
4f6ad4e60b text: Update comments 2021-04-24 03:27:56 +09:00
Hajime Hoshi
3df31c0fce internal/uidriver/glfw: Bug fix: Deadlock at FramebufferSize callback
glfw.PollEvents might invoke multiple FramebufferSize callbacks in
theory, this is very rare though. In this case, the sending an object
to the channel never ends.

This change fixes this deadlock by using 'select'.

Closes #1618
2021-04-24 02:22:51 +09:00
Hajime Hoshi
ac9a18931c internal/uidriver/glfw: Fix comments
Updates #1618
2021-04-23 03:28:14 +09:00
Hajime Hoshi
d446aa39a9 internal/uidriver/glfw: Bug fix: Always wait for SetFramebuffer
In case when the callback is not called, let's use timeout.

Updates #1618
2021-04-23 03:02:12 +09:00
Hajime Hoshi
4c520581b8 Update version to v2.2.0-alpha 2021-04-21 22:54:18 +09:00
Hajime Hoshi
c4c331b0d5 Fix misspellings 2021-04-21 22:50:00 +09:00
Hajime Hoshi
4cb6cb9d6a internal/uidriver/glfw: Misspelling 2021-04-21 22:29:54 +09:00
Hajime Hoshi
1013ca9c66 internal/uidriver/glfw: Bug fix: A window can never be 'maximized' on fullscreen
When the window is fullscreen, calling MaximizeWindow never returned.
Apparently the attribute glfw.Maximized can never be true on the
fullscreen mode.

This change fixes the issue by checking the fullscreen state.
2021-04-21 22:25:14 +09:00
corfe83
d24313e236
internal/devicescale: Fallback to simpler logic when trying to get DPI from monitor and failing (#1600)
Closes #1612
2021-04-21 11:43:23 +09:00
Hajime Hoshi
c7dd9a4107 internal/uidriver/glfw: Bug fix: Wait for Restore/Maximize/Iconify finishes explicitly
On Linux (and probably other UNIX OSes), glfwRestore, glfwMaximize,
and glfwIconify returns even though the window state has not changed.
Wait for its finish by a for loop and glfw.PollEvents.

Closes #1608
2021-04-21 00:52:06 +09:00
Hajime Hoshi
58572fb000 internal/uidriver/glfw: Bug fix: Unexpected small window size on Linux
At the initial phase, GLFW window's GetSize seems unreliable. Do not
call it on Linux. On the other hand, this is still necessary on macOS.

Updates #1606
Closes #1609
2021-04-20 23:38:34 +09:00
Hajime Hoshi
ec5b806241 Revert "internal/uidriver/glfw: Bug fix: Delay to enable SetSize callback"
This reverts commit fbe6961528.

Reason: This doesn't fix the issue unfortunately
2021-04-20 23:01:02 +09:00
Hajime Hoshi
fbe6961528 internal/uidriver/glfw: Bug fix: Delay to enable SetSize callback
On Linux, the SetSize callback is invoked with an unexpected value
at the initial phase. Just delay it until the initialization
finishes.
2021-04-20 22:53:48 +09:00
Hajime Hoshi
34be0371be examples/windowsize: Bug fix: Suppress calling SetWindowPosition if the position is not updated
This is a temoprary fix for the issue that the window size unexpectedly
shrunk on Linux.

Updates #1607
Closes #1605
2021-04-20 20:48:46 +09:00
Hajime Hoshi
47f569e473 internal/uidriver/glfw: Bug fix: setWindowSize could not accept a fullscreen size 2021-04-20 20:09:04 +09:00
Hajime Hoshi
ee8bfcd837 internal/uidriver/glfw: Bug fix: Disable the SetSize callback for most of GLFW window functions
Updates #1576
Updates #1585
Closes #1606
2021-04-20 18:32:39 +09:00
Hajime Hoshi
74018348c0 internal/uidriver/js: Update the error message
Updates #1604
2021-04-20 12:47:38 +09:00
Hajime Hoshi
191cc667e1 internal/uidriver/js: Add an error message when pointerlockerror happens
Updates #1604
2021-04-20 12:22:33 +09:00
Hajime Hoshi
18ce150495 internal/uidriver/glfw: Bug fix: getWindowSizeLimits should return -1 when the original value was -1
Updates #1602
2021-04-20 11:05:17 +09:00
Hajime Hoshi
08c3025560 audio/internal/readerdriver: Refactoring 2021-04-20 03:20:29 +09:00
Hajime Hoshi
7f8c3a13b3 examples/audiopanning: Bug fix: Align the buffer size
Closes #1598
2021-04-20 02:47:14 +09:00
Hajime Hoshi
24dc20e80e audio/internal/readerdriver: Bug fix: Need to align the buffer size 2021-04-20 02:39:33 +09:00
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