Commit Graph

458 Commits

Author SHA1 Message Date
Hajime Hoshi
5443fc312a internal/uidriver/cbackend: add a new file 2022-02-05 18:00:32 +09:00
Hajime Hoshi
3470caf5b1 internal/uidriver/cbackend: refactoring: separate the gamepad part 2022-02-05 17:59:27 +09:00
Hajime Hoshi
1570c506ae internal/gamepad: port the implementation for Android 2022-02-05 17:27:24 +09:00
Hajime Hoshi
d0e8efca33 internal/gamepad: port the implementation for Android 2022-02-04 23:23:22 +09:00
Hajime Hoshi
ee1b5e2044 internal/uidriver/mobile: stop requesting a frame on gamepads
In general, it is impossible to treat gamepad inputtings as events.
With FPSModeVsyncOffMinimum, the application cannot update with
gamepad inputtings.
2022-02-04 22:46:41 +09:00
Hajime Hoshi
577b4eed0d internal/uidriver/mobile: separate the gamepad part 2022-02-04 14:54:20 +09:00
Hajime Hoshi
ef45058037 internal/gamepad: implement for Linux
Updates #1452
2022-02-04 04:26:33 +09:00
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
85bebece04 internal/uidriver/js: bug fix: compile error 2022-02-02 02:27:08 +09:00
Hajime Hoshi
ea39fca10c internal/gamepad: rename functions *Num -> *Count 2022-02-02 02:01:46 +09:00
Hajime Hoshi
f5b68e5dc1 internal/gamepad: implement for Windows
Updates #1452
Updates #1764
2022-02-01 13:23:05 +09:00
Hajime Hoshi
cbf13630a9 internal/uidriver/glfw: remove an unnecessary error handling 2022-02-01 01:03:10 +09:00
Hajime Hoshi
84e53d4c61 internal/graphicsdriver/opengl, internal/uidriver/glfw: treat Win32 API errors correctly
The returned errors from syscall.Syscall* and windows.LazyProc.Call come
from GetLastError. The value of GetLastError is not reliable when the
function succeeds.

This change fixes the usages of error values. The error value is now
used only when the API explicitly fails.
2022-01-30 15:54:24 +09:00
Hajime Hoshi
1d59023649 internal/gamepad: make the APIs concurrent-safe again 2022-01-29 03:41:47 +09:00
Hajime Hoshi
71e17efd80 internal/gamepad: simplify the implementation by making the APIs concurrent-unsafe 2022-01-29 02:07:15 +09:00
Hajime Hoshi
5edfd1b743 internal/gamepad: move the implementation of gamepad for GOOS=js
Updates #1957
2022-01-29 01:44:42 +09:00
Hajime Hoshi
2df4e17ae9 internal/uidriver/mobile: bug fix: use AVFoudation instead of AVFAudio for old iOS 2022-01-27 00:28:01 +09:00
Hajime Hoshi
12de3a7749 internal/uidriver/mobile: bug fix: specify a shared AVAudioSession for CHHapticEngine
Closes #1976
2022-01-26 23:53:56 +09:00
Hajime Hoshi
eabd82cda0 internal/uidriver/mobile: make Vibrate async 2022-01-26 22:36:31 +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
11d01f4de1 internal/cbackend: add EbitenVibrateGamepad
Updates #1452
2022-01-26 03:32:52 +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
ca3f84fdd6 internal/uidriver/cbackend: rename an argument
Updates #1452
2022-01-11 04:12:08 +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
Hajime Hoshi
edff1f0dd9 internal/gamepaddb: enable mappings for iOS
Updates #1557
Closes #1722
2022-01-09 17:57:09 +09:00
Hajime Hoshi
4106fb15fe internal/gamepaddb: implement the mappings for Android
Updates #1557
2022-01-09 03:29:19 +09:00
Hajime Hoshi
116203c5a5 cmd/ebitenmobile: update gomobile version (reland)
This switches from .framework to .xcframwork for iOS.

Closes #1922
2022-01-05 17:31:46 +09:00
Hajime Hoshi
ebb4851a32 internal/uidriver/js: bug fix: context might be nil before the loop starts
Closes #1928
2022-01-03 15:17:30 +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
1799ed0b28 add a build tag 'ebitencbackend' and internal/cbackend
This enables to create a C archive with Ebiten without an actual driver
implementation. This enables Ebiten work on a platform Go doesn't support.
See also Hitsumabushi project: github.com/hajimehoshi/hitsumabushi.

The backend C API is not stable and might change later. Then, the build
tag 'ebitencbackend' is not documented on purpose.

Closes #1900
2021-12-22 21:12:48 +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