Commit Graph

291 Commits

Author SHA1 Message Date
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
fb3a022327 ebiten: use the DB's name for GamepadName
Updates #1949
2022-01-25 21:14:03 +09:00
Hajime Hoshi
cdf2335f5a refactoring: better error handlings on Windows 2022-01-23 18:30:40 +09:00
Hajime Hoshi
ff24f7718c internal/uidriver/glfw: use an original implementation for macOS
Updates #1452
2022-01-23 01:48:24 +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
Bertrand Jung
c4fbcdd1ae
internal/uidriver/glfw: use FreeConsole instead of hiding (#1961)
Closes #485
2022-01-16 22:31:17 +09:00
Hajime Hoshi
eb6e2026dc internal/uidriver/glfw: remove unused go:generate comments 2022-01-10 22:05:17 +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
bdf78dab27 internal/uidriver/glfw: Clean up build tags 2021-11-27 18:52:33 +09:00
Hajime Hoshi
ef5f8a9018 internal/uidriver/glfw: Adjusting the view size is not needed on macOS 12
Updates #1745
2021-11-27 18:47:05 +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
113796efae internal/uidriver/glfw: Bug fix: Crashed a transparent button with the green button
Updates #1822
Closes #1857
2021-10-31 18:21:19 +09:00
Hajime Hoshi
2aa232878d ebiten: Add VibrateGamepad and implement this on browsers
Updates #1452
2021-10-25 02:30:42 +09:00
Hajime Hoshi
dde53df6ae internal/uidriver/glfw: Bug fix: Compile error 2021-10-24 15:23:25 +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
fa9a08b3d0 internal/uidriver/glfw: Remove unnecessary comments 2021-10-10 16:02:41 +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
d4b5d17e75 internal/uidriver/glfw: Remove an unused function
Updates #1844
2021-10-09 21:11:44 +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
78cdb94552 internal/uidriver/glfw: Bug fix: Do not hide the window after its creation
Closes #1829
2021-09-29 01:00:17 +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
a7b5db6f65 internal/uidriver/glfw: Use GLFW's fullscreen when the window is transparent on macOS
Closes #1822
2021-09-24 03:22:09 +09:00
Hajime Hoshi
263276c5ab internal/uidriver/glfw: Refactoring 2021-09-23 02:48:22 +09:00
Hajime Hoshi
422387c7cd internal/uidriver/glfw: Refactoring 2021-09-23 02:03:37 +09:00
Hajime Hoshi
9dbff2cddd internal/uidriver/glfw: Make SetFullscreen more responsive on macOS 2021-09-20 21:01:17 +09:00
Hajime Hoshi
0ac4c7323f internal/uidriver/glfw: Bug fix: Potential crash when xgb.NewConn fails 2021-09-19 18:23:51 +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
f0395dd329 internal/uidriver/glfw: Skip adjusting the view size with OpenGL 2021-09-18 23:59:37 +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
7be00d79e8 internal/uidriver/glfw: Fix unstable FPS on fullscreen on macOS
FPS was unstable on fullscreen mode i.e., when the view size is the
same as the monitor size.

By using a little different size view, FPS becomes stable.

Updates #1745
2021-09-18 19:22:09 +09:00
Hajime Hoshi
e98e371bb4 internal/uidriver: Bug fix: Compile error on Linux/UNIX 2021-09-18 16:58:30 +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