Hajime Hoshi
e1c65d395c
internal/uidriver/glfw: add a comment
...
Updates #1982
2022-02-03 01:41:09 +09:00
Hajime Hoshi
9999b65261
internal/uidriver/glfw: bug fix: a callback must be registered at createWindow
2022-02-03 01:00:24 +09:00
Hajime Hoshi
80f178b5e8
internal/uidriver/glfw: initialize the callback at init
2022-02-03 00:31:49 +09:00
Hajime Hoshi
a19bbd3b09
internal/uidriver/glfw: use shoten sleeping time at waitForFramebufferSizeCallback
...
Updates #1918
2022-02-03 00:28:14 +09:00
Hajime Hoshi
f5b68e5dc1
internal/gamepad: implement for Windows
...
Updates #1452
Updates #1764
2022-02-01 13:23:05 +09:00
Hajime Hoshi
8f1f9e3a5f
internal/uidriver/glfw: do not set the window size on fullscreen
...
The window size and the framebuffer size of fullscreen doesn't match.
Updates #1960
2022-01-26 16:23:34 +09:00
Hajime Hoshi
5ee493e85a
internal/uidriver/glfw: bug fix: needed to adjuts the units between the framebuffer and the window
...
Updates #1960
Closes #1975
2022-01-26 04:58:08 +09:00
Hajime Hoshi
f76d1c8d50
Revert "internal/uidriver/glfw: bug fix: needed to set the window position after restoring from fullscreen"
...
This reverts commit 99a15d81f4
.
Reason: The true culprit was 12c144070f
Updates #1975
2022-01-26 04:57:28 +09:00
Hajime Hoshi
99a15d81f4
internal/uidriver/glfw: bug fix: needed to set the window position after restoring from fullscreen
...
Closes #1975
2022-01-26 04:29:12 +09:00
Hajime Hoshi
da1d6ddf17
internal/uidriver/glfw: refactoring: SetTitle after restoring from fullscreen is no longer needed
2022-01-26 04:15:09 +09:00
Hajime Hoshi
f5edc189e6
internal/uidriver/glfw: bug fix: wrong lock usages
2022-01-17 01:29:29 +09:00
Elias Daler
12c144070f
internal/uidriver/glfw: fix window float enable/disable ( #1962 )
...
Closes #1960
2022-01-17 00:28:25 +09:00
Hajime Hoshi
d4b722eb06
ebiten: rename VibrateOptions.Intensity -> Magnitude
...
Updates #1452
2022-01-10 16:02:26 +09:00
Changkun Ou
626c91e360
ebiten: add RunOnMainThread(func()) ( #1927 )
...
Closes #1926
2022-01-03 03:30:29 +09:00
Hajime Hoshi
220a8f48ac
internal/uidriver/glfw: refactoring: remove initTitle
2021-12-29 22:26:56 +09:00
Hajime Hoshi
5ee2ff56ca
interna/uidriver: refactoring: remove initFPSMode
2021-12-29 22:21:27 +09:00
Hajime Hoshi
39ef252c2e
ebiten: Add VibrationOptions to specify intensity ( #1891 )
...
Updates #1452
2021-12-04 22:14:02 +09:00
Hajime Hoshi
e6f2764d08
internal/uidriver/glfw: Refactoring: Remove toChangeSize
...
Updates #1884
2021-11-27 18:00:39 +09:00
Hajime Hoshi
22e64c7df0
internal/uidriver/glfw: Bug fix: Rendering should be updated after restoring from fullscreen
...
u.toChangeSize affects the result of u.updateSize. When the callback
for WindowSetSize is invoked, toChangeSize should be true.
In order to simplify the logic, we have to remove toChangeSize later.
Closes #1884
2021-11-27 17:53:40 +09:00
Hajime Hoshi
73bf7a0939
internal/uidriver/glfw: Bug fix: Return a tentative scale when glfw.GetPrmaryMonitor returns 1
...
Updates #1878
2021-11-24 22:35:10 +09:00
Hajime Hoshi
ee414ed849
Revert "internal/uidriver/glfw: Refactoring"
...
This reverts commit c4df397d87
.
Reason: Compile error
2021-11-12 22:29:03 +09:00
Hajime Hoshi
c4df397d87
internal/uidriver/glfw: Refactoring
2021-11-12 22:19:32 +09:00
Hajime Hoshi
ef62f407d1
Clean up build tags
2021-10-24 15:05:36 +09:00
Hajime Hoshi
7c6f2fd799
ebiten: Vibrate takes time durations instead of the options
...
Android and browsers can specify only a time duration for vibration.
VibrateOptions is renamed to GamepadVibrateOptions for gamepads.
Updates #1452
2021-10-24 05:02:49 +09:00
Hajime Hoshi
b8a5ea7bd6
ebiten: Add Vibrate and VibrateOptions, and implement this on browsers
...
Updates #1452
2021-10-24 01:05:33 +09:00
Hajime Hoshi
6f29e57378
internal/uidriver/glfw: Wait for a FramebufferSize callback for the initial temporary window
...
Updates #1847
2021-10-13 00:16:18 +09:00
Hajime Hoshi
2f2ccbbe55
internal/uidriver/glfw: Bug fix: Wait for FramebufferSize callback after a window creation
...
Closes #1847
2021-10-13 00:04:14 +09:00
Hajime Hoshi
0eb6c846c7
internal/uidriver/glfw: Refactoring: Remove unused functions
2021-10-10 16:02:01 +09:00
Hajime Hoshi
4604a00e39
internal/uidriver/glfw: Refactoring: Rename functions
2021-10-10 15:50:12 +09:00
Hajime Hoshi
4580f9fa16
internal/uidriver/glfw: Refactring: Rename InDP -> InDIP
...
This change also renames some functions and variables.
2021-10-10 15:47:15 +09:00
Hajime Hoshi
da6b75bc6d
internal/uidriver/glfw: Bug fix: Adjust the window size along with the device scale
...
After this change, UserInterface's windowWidth and windowHeight are
now windowWidthInDP and windowHeightInDP in device-independent pixels.
Closes #1844
2021-10-10 14:29:34 +09:00
Hajime Hoshi
fcd8a6c653
internal/uidriver/glfw: Bug fix: Get the correct initial monitor and its scale
...
Before this fix, Win32API is used to get the current monitor. This
might not work and return an unexpected monitor on some machines after
the runloop starts.
Instead, use the current window to get the current monitor correctly
instead of the Win32APIs. To get the initial monitor, the API
ForegroundWindow is still used.
Updates #1584
Updates #1844
2021-10-09 18:18:22 +09:00
Hajime Hoshi
77664ff057
internal/uidriver/glfw: Use the correct initial monitor on Linux/UNIX
...
Closes #1827
2021-09-25 02:48:13 +09:00
Hajime Hoshi
23566a7d2e
internal/uidriver/glfw: Refactoring
2021-09-25 02:14:14 +09:00
Hajime Hoshi
8ed55ef42d
internal/uidriver/glfw: Use the window size on a native fullscreen
...
Updates #1745
2021-09-19 00:35:18 +09:00
Hajime Hoshi
188e80d2f7
internal/uidriver/glfw: Bug fix: FPS is dropped when pressing the green button
...
Updates #1745
2021-09-18 22:16:21 +09:00
Hajime Hoshi
1a7cf7b3b8
internal/glfw/glfw: Modify GLFW for Windows to make the window non-floating
...
Closes #1506
2021-09-18 20:47:26 +09:00
Hajime Hoshi
428c079e52
internal/uidriver/glfw: Make a 'native' fullscreen on macOS
...
This is a breaking change. On macOS, `SetFullscreen` creates a new
independent space and maximize the size of the window there.
Updates #1506
Closes #1579
2021-09-18 16:31:22 +09:00
Hajime Hoshi
2a390c18c1
internal/uidriver/glfw: Do not iconify the fullscreen window on Linux
...
Updates #1506
2021-09-18 00:52:04 +09:00
Hajime Hoshi
ec2f823420
internal/uidriver/glfw: Clear the device scale cache when monitors are changed
2021-09-15 13:04:38 +09:00
divVerent
5bc7b93e6f
Move VideoModeScaleAt into internal/uidriver/glfw. ( #1812 )
...
It's only used by GLFW, and has been in devicescale only to ease migration
to separate video mode vs content scaling.
Updates #1774
2021-09-15 12:47:04 +09:00
divVerent
923c84a3d6
Split the concept of device scale and screen scale ( #1811 )
...
We now set deviceScale to always the mapping from logical window system pixels
to device independent pixels (which is what Ebiten API users expect), and
introduce a new concept of videoModeScale that maps from video mode to logical
window system pixels.
videoModeScale is now only used for computing full-screen resolutions, while
deviceScale is used for any other conversion.
Fixes window sizes on X11, should be a NOP otherwise.
Closes #1774 .
2021-09-15 01:03:04 +09:00
divVerent
60df512352
Switch out the devicescale implementation by one that relies on glfw/xrandr. ( #1800 )
...
This should fix fullscreen mode on Linux/X11 systems in general,
while not affecting other systems.
Note that this deletes a bunch of OS X specific and Windows specific code,
as GLFW already provides this functionality.
This change is not expected to cause regressions, however,
the current behavior is still wrong and leads to wrong/unintended window sizes.
To be fixed in further PRs.
Updates #1774
2021-09-14 12:35:02 +09:00
Hajime Hoshi
39e7f71ccb
internal/uidriver/glfw: Bug fix: Forbide Maximize/MinimizeWindow on the native fullscreen on macOS
...
Closes #1810
2021-09-12 23:38:44 +09:00
Hajime Hoshi
f23dadb8ae
Add internal/gamepaddb ( #1805 )
...
This is basically a revert of 93a156a718
.
This implements parsing the SDL gamepad mappings by Ebiten instead
of GLFW, so that Ebiten can handle parsing errors completely.
Closes #1802
2021-09-11 22:46:05 +09:00
Hajime Hoshi
37771717cc
internal/uidriver: Bug fix: Potential memory leak by [:0]
...
Updates #1803
2021-09-10 02:17:29 +09:00
Hajime Hoshi
106ff7a84b
internal/ui: Reduce calls of glfw.GetMonitors
...
Updates #1803
2021-09-09 11:14:08 +09:00
Hajime Hoshi
d5ce0dbd90
internal/uidriver/glfw: Bug fix: Disable the sticky mode on FPSModeVsyncOffMinimum
...
Closes #1791
2021-08-31 11:43:11 +09:00
Hajime Hoshi
40d2dd3ba7
internal/uidriver/glfw: Update comments
...
Updates #1787
2021-08-26 02:05:30 +09:00
Hajime Hoshi
15ac69b8d5
internal/graphicsdriver/metal: Bug fix: Disable presentsWithTransaction on fullscreen
...
Closes #1745
2021-08-08 17:40:37 +09:00