Hajime Hoshi
990fb14f17
internal/uidriver/glfw: Separate createWindow and registring the callback
...
createWindow created a window and also registered the SetSize callback.
This was problematic in setWindowSize, since the callback was invoked
in setWindowSize unexpectedly.
This change separates createWindow and registring the callback so that
the created window in setWindowSize doesn't invoke the callback until
setWindowSize finishes.
Closes #1505
2021-03-06 17:48:28 +09:00
Hajime Hoshi
fda421c5fe
internal/uidriver/glfw: Bug fix: SEGV at setWindowSize
...
u.window can be a different value before and after the function
setWindowSize.
Closes #1522
2021-03-03 23:04:35 +09:00
Hajime Hoshi
d913e66cd9
Revert "uidriver/glfw: Bug fix: Do not iconify the fullscreen window automatically"
...
This reverts commit 61bf10e73e
.
Reason: This prevents the app from iconifying when toggling apps.
Updates #1405
Closes #1504
2021-02-23 20:13:21 +09:00
Hajime Hoshi
18d526c2d3
internal/uidriver/glfw: Bug fix: Crash when returning from fullscreen
...
ForceUpdate was called unexpectedly inside Update. This caused the
race condition.
Closes #1505
2021-02-23 16:52:12 +09:00
Hajime Hoshi
1517f80430
internal/uidriver/glfw: Refactoring
2021-02-11 04:02:18 +09:00
Hajime Hoshi
ec912e5cad
internal/uidriver/glfw: Remove the dirty hack creating a temporary UI instance
...
Updates #1122
2021-02-11 03:45:39 +09:00
Hajime Hoshi
fea802b39d
internal/uidriver: Replace mutex usages with atomic
...
Updates #1073
2021-02-11 02:38:15 +09:00
Hajime Hoshi
9400efa9a5
internal/uidriver/glfw: Update the screen on resizing
...
Closes #1204
2021-02-07 23:03:56 +09:00
Hajime Hoshi
d999b4dc8e
internal/uidriver/glfw: Bug fix: Enable to specify ebiten.Image to SetWindowIcon
...
Closes #1468
2021-02-07 21:18:30 +09:00
Hajime Hoshi
61bf10e73e
uidriver/glfw: Bug fix: Do not iconify the fullscreen window automatically
...
Fixes #1405
2020-10-27 03:14:55 +09:00
Jake Coffman
290f05060a
ebiten: Add ebitensinglethread build tag ( #1396 )
...
Updates #1367
2020-10-21 02:55:17 +09:00
Hajime Hoshi
f39f80c7c3
uidriver/glfw: Refactoring
2020-10-17 17:45:29 +09:00
Hajime Hoshi
974ec525fa
uidriver/glfw: Refactoring
2020-10-17 15:09:12 +09:00
Hajime Hoshi
33fd7c935a
uidriver/glfw: Avoid (*thread).Call when possible at (*UserInterface).loop
...
Updates #1367
2020-10-17 06:08:15 +09:00
Hajime Hoshi
cbb70d045c
uidriver/glfw: Eliminate (*thread).Call at (*UserInterface).update
...
Updates #1367
2020-10-17 06:03:38 +09:00
Hajime Hoshi
ee50f611ee
uidriver/glfw: Reduce (*thread).Call at (*UserInterface).updateSize
...
Updates #1367
2020-10-17 05:53:21 +09:00
Hajime Hoshi
d9906835ad
uidriver/glfw: Reduce (*thread).Call at (*UserInterface).update
...
Updates #1367
2020-10-17 05:33:34 +09:00
Hajime Hoshi
1864c22ad6
uidriver/glfw: Reduce (*thread).Call at (*Input).update
2020-10-17 05:22:23 +09:00
Hajime Hoshi
495b2b722a
uidriver/glfw: Reduce (*thread).Call at (*UserInterface).update
2020-10-17 04:38:15 +09:00
Hajime Hoshi
7762f5dcec
uidriver/glfw: Reduce (*thread).Call
2020-10-17 04:33:34 +09:00
Hajime Hoshi
1db7bed2a7
uidriver/glfw: Refactoring
2020-10-17 02:57:03 +09:00
Hajime Hoshi
770661c609
driver: Refactoring: Remove (UIContext).Draw
2020-10-15 01:27:50 +09:00
Hajime Hoshi
eed619ad0f
graphicsdriver/metal, graphicsdriver/opengl: Reland: Remove the thread usages for performance
...
Instead, graphicscommand package has a thread.
Updates #1367
2020-10-13 02:46:31 +09:00
Hajime Hoshi
713eee1117
Revert "graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance"
...
This reverts commit 2942f10d9d
.
Reason: Compile error on mobiles and runtime error on browsers
2020-10-13 02:12:02 +09:00
Hajime Hoshi
2942f10d9d
graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance
...
Instead, graphicscommand package has a thread.
Updates #1367
2020-10-13 01:50:54 +09:00
Hajime Hoshi
ee4ebaaa95
Clean up the 'js' build tags
...
Updates #1129
2020-10-07 02:07:03 +09:00
Hajime Hoshi
41cf90a321
ebiten: Change the default value of IsRunningOnUnfocused to be true
...
Fixes #1180
2020-10-07 00:30:49 +09:00
Hajime Hoshi
bf515bb594
Update version to v2.0.0-alpha
2020-10-04 04:30:40 +09:00
Hajime Hoshi
9890dc51da
uidriver/glfw: Bug fix: Need to call updateVsync after setWindowSize
...
Fixes #1363
2020-09-22 18:45:56 +09:00
Hajime Hoshi
ee52c88e98
uidriver/glfw: Bug fix: Set the correct window size when going back from fullscreen
2020-09-21 19:20:58 +09:00
Hajime Hoshi
3fc328db8d
uidriver/glfw: Adjust monitor sizes with math.Ceil
...
deviceScaleFactor() sometimes returns an unnice value (e.g.,
1.502361). Add math.Ceil whenever the calculation involves the
device scale factor.
2020-09-21 18:52:27 +09:00
Hajime Hoshi
40e35fa047
uidriver/glfw: Bug fix: Unscale the size for framebuffers on Linux/UNIX
...
Fixes #1307
2020-09-19 01:04:18 +09:00
Hajime Hoshi
97607f5779
graphicsdriver/glfw: Bug fix: Convert window size unit correctly on Linux/UNIX
...
Updates #1307
2020-09-19 00:31:34 +09:00
Hajime Hoshi
5278a7c6d6
uidriver/glfw: Bug fix: Use the correct scale for GLFW APIs on Linux/UNIX
...
Updates #1307
2020-09-19 00:21:10 +09:00
Hajime Hoshi
a3b41515a9
ui: Replace the native window's type (unsafe.Pointer) with uintptr
...
Updates #1306
2020-09-04 00:51:48 +09:00
Hajime Hoshi
349faa0f34
thread: Use an error value instead of context.Context
2020-08-30 02:18:12 +09:00
Hajime Hoshi
1ed2b09ba0
uidriver/glfw: Ensure that canceling happens after all the queued tasks are done
2020-08-29 23:27:20 +09:00
Hajime Hoshi
932d599c98
uidriver/glfw: Bug fix compilation failure on macOS and Windows
2020-08-24 03:31:46 +09:00
Hajime Hoshi
a7d234e3c8
uidriver/glfw: Refactoring: make currentMonitorByOS more explicit
2020-08-24 03:27:38 +09:00
Hajime Hoshi
9bff1c79be
uidriver/glfw: Refactoring
2020-08-24 03:05:38 +09:00
Hajime Hoshi
af6961fc17
uidriver/glfw: Bug fix: isInitWindowMaximized didn't unlock the mutex
2020-08-24 02:55:31 +09:00
Hajime Hoshi
b1bc06935a
uidriver/glfw: Update comments
2020-08-24 00:57:48 +09:00
Hajime Hoshi
ed3a4a734e
uidriver/glfw: Refactoring
2020-08-24 00:34:57 +09:00
Hajime Hoshi
9f8054c2d5
uidriver/glfw: Misspelling
2020-08-24 00:10:43 +09:00
Hajime Hoshi
07480ed66d
uidriver/glfw: Add better fallbacks for currentMonitorFromPosition
...
Updates #1119
2020-08-23 23:38:03 +09:00
Hajime Hoshi
77fa0cb9ef
ui: Add SetInitFocused
...
Fixes #769
2020-08-23 02:19:09 +09:00
Hajime Hoshi
3eaa7dd0e1
uidriver/glfw: Set No-API when creating a hidden window first
...
GLFW tries to create an OpenGL context by default when creating a
window. This is not necessary when OpenGL is not used. This is an
optimization by skipping to create an OpenGL context if possible.
2020-07-05 15:01:06 +09:00
Hajime Hoshi
d98713728a
uidriver/glfw: Bug fix: SetVsyncEnabled(false) did not work before the main loop
...
Fixes #1197
2020-06-14 11:50:58 +09:00
Hajime Hoshi
7b960a2df4
uidriver/glfw: Use the actual window size for the offscreen
...
On Windows, a specified window size might not match with the
actual window size when the size is too big. In this case, Ebiten
could not render the offscreen well and the upper side was cropped.
To avoid this, use the actual window size for the offscreen.
Fixes #1163
2020-05-22 18:18:38 +09:00
Hajime Hoshi
8777140e91
driver: Simplify UIContext.Update
2020-04-03 00:18:27 +09:00