Hajime Hoshi
f8097eb45d
internal/ui: give an initial window size at createWindow
...
This enables to skip setWindowSizeInDIPImpl in most cases.
Updates #1651
Updates #1914
2022-02-08 19:36:30 +09:00
Hajime Hoshi
320e7037f6
internal/ui: update comments
2022-02-08 19:23:38 +09:00
Hajime Hoshi
6dbc5ba558
internal/ui: refactoring: call updateWindowSizeLimits in createWindow
2022-02-08 16:06:12 +09:00
Hajime Hoshi
4c6c31e384
all: reorder build tags in an alphabetical order
2022-02-08 15:49:15 +09:00
Hajime Hoshi
9c8b4db81f
internal/ui: separate 'vibrate' part to internal/vibrate
2022-02-08 14:48:55 +09:00
Hajime Hoshi
d2d3673bd2
internal/ui: remove a redundant call of SetTitle
2022-02-08 04:30:58 +09:00
Hajime Hoshi
2fc09c7fcb
internal/ui: use the cursor position to choose the initial monitor for Linux/UNIX
...
Updates #1918
Closes #1982
2022-02-08 03:20:45 +09:00
Hajime Hoshi
294ee43716
internal/ui: remove a special logic for UNIX
...
The issue #1118 can no longer be reproduced.
Updates #1118
Updates #1982
2022-02-08 01:29:22 +09:00
Hajime Hoshi
cb4085277b
internal/ui: bug fix: adjust the window position correctly
...
Updates #1982
2022-02-07 23:52:16 +09:00
Hajime Hoshi
ed04021151
internal/ui: use the cursor position to choose the initial monitor for Windows
...
Updates #1918
Updates #1982
2022-02-07 23:31:46 +09:00
Hajime Hoshi
cafb71719c
internal/ui: use the cursor position to choose the initial monitor
...
Updates #1982
2022-02-07 22:37:10 +09:00
Hajime Hoshi
126dc81a96
internal/ui: add a comment
2022-02-07 00:51:48 +09:00
Hajime Hoshi
b78160262c
internal/ui: rename files
2022-02-07 00:37:32 +09:00
Hajime Hoshi
f18aef2b08
ebiten: refactoring: move the caller of SetGraphicsDriver to the package ui
2022-02-06 22:01:25 +09:00
Hajime Hoshi
df60c4c92d
internal/driver: rename to internal/graphicsdriver
2022-02-06 20:41:32 +09:00
Hajime Hoshi
52f4c409ac
internal/ui: refactoring: make Graphics a global function
2022-02-06 20:29:49 +09:00
Hajime Hoshi
0f09ddfbd2
internal/driver: remove Window
...
Closes #1983
2022-02-06 20:12:40 +09:00
Hajime Hoshi
80c03792cb
internal/driver: move the key definitions to internal/ui
...
Updates #1983
2022-02-06 19:14:18 +09:00
Hajime Hoshi
887a3ff749
internal/cbackend: bug fix: compile error again
2022-02-06 19:07:17 +09:00
Hajime Hoshi
0eecab8278
internal/cbackend: bug fix: compile error
2022-02-06 18:59:21 +09:00
Hajime Hoshi
3b7b66170f
internal/driver: remove an unused type Modifier
2022-02-06 18:49:33 +09:00
Hajime Hoshi
2fbfa5444b
internal/driver: remove Input
2022-02-06 18:34:31 +09:00
Hajime Hoshi
6f72b15912
internal/driver: move some definitions to internal/ui
...
Updates #1983
2022-02-06 18:13:45 +09:00
Hajime Hoshi
149736c3cf
internal/uidriver/*: integrate the packages into internal/ui
...
Updates #1983
2022-02-06 17:23:04 +09:00
Hajime Hoshi
67bb58849e
internal/uidriver/mobile: add build tags
2022-02-06 15:59:05 +09:00
Hajime Hoshi
12a70952a9
internal/glfw: remove an unreached code
2022-02-06 05:24:25 +09:00
Hajime Hoshi
93b2a0756b
internal/gamepaddb: allow the standard layout mapping for any platforms
...
Closes #1957
2022-02-06 03:38:02 +09:00
Hajime Hoshi
19bfc97a5e
mobile/ebitenmobileview: bug fix: compile error
2022-02-05 23:26:44 +09:00
Hajime Hoshi
2b902bacd9
internal/driver: remove an unused file
2022-02-05 23:14:00 +09:00
Hajime Hoshi
67663795fd
internal/gamepaddb: move driver.StandardGamepadButton to gamepaddb.StandardButton
2022-02-05 23:11:09 +09:00
Hajime Hoshi
627509e974
internal/gamepad: move driver.GamepadButton to gamepad.Button
2022-02-05 23:03:30 +09:00
Hajime Hoshi
1bee10f999
internal/gamepad: move constants from internal/driver
2022-02-05 22:42:14 +09:00
Hajime Hoshi
3bdd8097b5
internal/uidriver: refactoring: remove the gamepad part
...
Use the gamepad package instead.
2022-02-05 22:32:31 +09:00
Hajime Hoshi
e6e0c6d850
internal/uidriver/glfw: refactoring
2022-02-05 21:52:06 +09:00
Hajime Hoshi
bf1cb035eb
internal/gamepad: port the gamepad part for c-backend
2022-02-05 19:11:57 +09:00
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
8d9937801b
internal/gamepad: refactoring
2022-02-05 02:11: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
f6d8f42c36
internal/gamepad: refactoring: use unix.InotifyEvent
2022-02-04 04:59:40 +09:00
Hajime Hoshi
ef45058037
internal/gamepad: implement for Linux
...
Updates #1452
2022-02-04 04:26:33 +09:00
Hajime Hoshi
d2afbd43cc
internal/gamepaddb, mobile/ebitenmobileview: refactoring
2022-02-03 04:35:55 +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
f3f8f6177c
internal/gamepad: add gamepad_null.go
2022-02-02 02:18:02 +09:00
Hajime Hoshi
ea39fca10c
internal/gamepad: rename functions *Num -> *Count
2022-02-02 02:01:46 +09:00
Hajime Hoshi
a8576008f0
internal/gamepads: refactoring: remove a struct member
2022-02-02 00:32:29 +09:00
Hajime Hoshi
96ddec1753
internal/gamepad: refactoring reorder implementations for consistency
2022-02-01 13:54:33 +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
e261951946
internal/gamepad: remove nativeGamepad.present
2022-01-30 18:59:25 +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
178a1d929c
internal/gamepad: add comments and make Vibrate concurrent-safe
2022-01-29 03:50:43 +09:00
Hajime Hoshi
1d59023649
internal/gamepad: make the APIs concurrent-safe again
2022-01-29 03:41:47 +09:00
Hajime Hoshi
2e9ce94ed0
internal/gamepad: call init in update to make the initialization faster
2022-01-29 03:06:56 +09:00
Hajime Hoshi
d3cf8935e8
internal/gamepad: add comments
2022-01-29 02:22:10 +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
d0a6ce6567
internal/graphicsdriver/metal: disable presentsWithTransaction in the fullscreen mode
...
Updates #1745
Closes #1974
2022-01-26 03:55:14 +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
a049c403cf
internal/gamepad: bug fix: go-vet failed (misuse of unsafe.Pointer)
...
Updates #1452
2022-01-23 02:08:30 +09:00
Hajime Hoshi
580307f150
internal/gamepad: bug fix: go-vet failed
...
Updates #1452
2022-01-23 01:56:14 +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
84c680c6ed
internal/shader: ban the operator div on a matrix
...
The operator div on a matrix doesn't work on Metal.
2022-01-21 03:37:34 +09:00
Hajime Hoshi
2e5b4954f3
internal/shader: bug fix: forbid mat + float
...
mat + float doesn't work on Metal.
2022-01-21 02:42:22 +09:00
Hajime Hoshi
99f003a17a
internal/shader: bug fix: mat *= vec is not allowed
...
Updates #1971
2022-01-21 02:03:50 +09:00
Hajime Hoshi
0415773b94
internal/shader: bug fix: allow the *= operator for a vector and a matrix
...
Updates #1971
2022-01-21 01:59:58 +09:00
Hajime Hoshi
8b8b96c9e7
internal/shader: bug fix: wrong test (int*float)
2022-01-21 01:31:46 +09:00
Hajime Hoshi
8d2bf6525c
internal/shader: bug fix: wrong type checkings for operator *
...
Updates #1971
2022-01-21 01:06:02 +09:00
Hajime Hoshi
8321cecfdd
internal/atlas: typo
2022-01-19 23:44:59 +09:00
Hajime Hoshi
0a537b7ad2
internal/shader: bug fix: a number literal must be represented as floats in some contexts
2022-01-17 21:14:07 +09:00
Hajime Hoshi
4940159e5b
internal/shader: bug fix: operators between vec/mat and float should work
...
Closes #1963
2022-01-17 20:52:44 +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
260f7e07df
internal/shader: bug fix: deduction checks for the %
operator were lacked
2022-01-14 03:51:04 +09:00
Hajime Hoshi
bf48a0b11a
internal/shaderir: bug fix: test failures
2022-01-12 01:57:06 +09:00
Hajime Hoshi
08ddb4233b
internal/shaderir/glsl: bug fix: % was not available on old GLSLs
...
Use a new utility function modInt instead.
Closes #1951
2022-01-12 01:41:09 +09:00
Hajime Hoshi
d110716dc0
internal/shader: bug fix: check types correctly for assign operators
...
Closes #1950
2022-01-12 00:39:39 +09:00
Hajime Hoshi
83bd0772d4
internal/shader: bug fix: % should be valid only for integers
...
Closes #1947
2022-01-11 23:53:09 +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