Hajime Hoshi
6ce8f77c53
gofmt
2022-06-06 00:28:19 +09:00
Hajime Hoshi
e5172d7b6c
update Oto
2022-06-05 23:13:18 +09:00
Hajime Hoshi
0256b0cfbf
internal/graphicsdriver/directx: bug fix: disable fullscreen by Alt+Enter
...
By default, DirectX 12 tries to make the window fullscreen by Alt+Enter.
This caused application crashes. Let's disable this feature.
Closes #2123
2022-06-05 16:16:09 +09:00
Hajime Hoshi
51fe48fb76
internal/gamepad: bug fix: wrong offset especially on 32bit Linux
...
Closes #2122
2022-06-05 12:48:47 +09:00
Hajime Hoshi
744340da5e
update Oto: use arecord -L to list devices
...
Closes #2118
2022-06-05 12:16:02 +09:00
Hajime Hoshi
04643d06f7
update Oto: try other devices than 'default' when needed
...
Closes #2118
2022-06-04 22:56:11 +09:00
Hajime Hoshi
23b8d60e42
go mod tidy
2022-06-04 22:54:32 +09:00
Hajime Hoshi
c2251d49b5
.github/workflows: add -l to -gcflags
2022-06-04 17:45:59 +09:00
Hajime Hoshi
1fa5696c91
.github/workflows: add a building test without optimization to check potential stack overflow
2022-06-04 17:24:46 +09:00
Hajime Hoshi
5cdd2f8bce
internal/affine: further optimization to avoid heap allocation
...
Updates #2119
2022-06-04 15:13:30 +09:00
Hajime Hoshi
d518e64e22
Revert "internal/graphicsdriver/directx: refactoring: add syscallN"
...
This reverts commit 55a490736a
.
Reason: This has a potential risk of stack overflow.
Closes #2120
2022-06-04 13:58:01 +09:00
Hajime Hoshi
ecaa25faba
internal/affine: avoid heap allocations by casting a variable to a concrete type
...
This is a dirty hack but seems efficient.
Closes #2119
2022-06-04 13:18:14 +09:00
Hajime Hoshi
f69c550992
internal/graphicsdriver/directx: bug fix: go:nosplit was required for syscallN
...
Updates #2116
Closes #2117
2022-06-04 01:11:22 +09:00
Hajime Hoshi
55a490736a
internal/graphicsdriver/directx: refactoring: add syscallN
...
syscall.SyscallN is available as of Go 1.18 so this change implemented
our original syscallN function.
syscallN also panics when a given function pointer is 0. This helps
debugging especially on Xbox.
Updates #2084
2022-06-03 21:56:34 +09:00
Hajime Hoshi
3e1b313221
internal/graphicsdriver/directx: bug fix: ID3D12Resource::Map sometimes retrying
...
Updates #2113
Closes #2116
2022-06-03 21:56:30 +09:00
Hajime Hoshi
8e4e3d67c4
internal/gamepad: refactoring
2022-06-03 19:00:21 +09:00
Hajime Hoshi
2eb4ef1a94
internal/gamepad: give a window from another package instead of GetActiveWindow
...
GetActiveWindow doesn't work on Xbox.
Updates #2084
2022-06-03 18:42:54 +09:00
Hajime Hoshi
1580e92dfc
internal/gamepad: refactoring
2022-06-03 18:06:54 +09:00
Hajime Hoshi
90d26305e7
internal/gamepad: unify the naming convention for Win32API with other packages
2022-06-03 16:59:44 +09:00
Hajime Hoshi
124f233de0
internal/gamepad: cast returning values to uint32
2022-06-03 16:52:49 +09:00
Hajime Hoshi
532b476c4e
Revert "internal/graphicsdriver/directx: pass nil for pReadRange at Map"
...
This reverts commit 3b13158cc0
.
Reason: Specifying nil for reading ranges is not efficient
2022-06-03 13:59:34 +09:00
Hajime Hoshi
c6c45aadfa
Revert "Revert "internal/glfwwin: ignore errors from DWM functions""
...
This reverts commit 991cec993c
.
Reason: Reverted a wrong commit
2022-06-03 13:59:16 +09:00
Hajime Hoshi
991cec993c
Revert "internal/glfwwin: ignore errors from DWM functions"
...
This reverts commit 9ad87c0153
.
Reason: Specifying nil for reading ranges is not efficient
2022-06-03 13:49:45 +09:00
Hajime Hoshi
3b13158cc0
internal/graphicsdriver/directx: pass nil for pReadRange at Map
...
Updates #2113
2022-06-03 13:45:08 +09:00
Hajime Hoshi
9ad87c0153
internal/glfwwin: ignore errors from DWM functions
...
DWM functions might not be implemented on Proton. In the original
GLFW implementation, the returning values are not checked.
Updates #2113
2022-06-03 01:36:31 +09:00
Hajime Hoshi
c29c423686
internal/glfwwin, internal/graphicsdriver/directx: bug fix: HRESULT and Errno are imcompatible
2022-06-03 00:41:04 +09:00
Hajime Hoshi
7d95dddb1a
internal/glfwwin: refactoring
2022-06-03 00:32:36 +09:00
Hajime Hoshi
666d50e83d
internal/glfwwin: use HRESULT for an error value instead of GetLastError
...
GetLastError might not be reliable for some APIs like DwmFlush.
Updates #2113
2022-06-02 23:02:09 +09:00
Hajime Hoshi
4a9caf8afb
internal/graphicsdriver/directx: ignore higher 32bit values for Errno
...
Updates #2113
2022-06-02 23:01:38 +09:00
Hajime Hoshi
fb03a1e351
internal/graphicsdriver/directx: bug fix: ID3D12Resource::Unmap does not return an value
...
Updates #2113
2022-06-02 12:52:58 +09:00
Hajime Hoshi
4a684c4195
treat Windows error values as uint32 instead of windows.Handle
...
The error value are defined as windows.Handle (64bit) in
golang.org/x/sys/windows, but an actual type should be HRESULT (32bit).
This causes an issue that a returning value from a Windows API was
recognized as a non-zero error value though the value was not an error,
when the value's lower 32-bits are all zero.
See also https://github.com/golang/go/issues/48736#issuecomment-1143993096
Updates #2113
2022-06-02 12:10:21 +09:00
Hajime Hoshi
b900f83a01
internal/graphicsdriver/directx: refactoring: remove an unused member Image.numRows
2022-06-02 01:53:27 +09:00
Hajime Hoshi
0dc6e4e64e
internal/graphicsdriver/directx: use ID3D12Resource instead of ID3D12Resource1
...
Updates #2114
2022-06-02 01:26:02 +09:00
Hajime Hoshi
432365ff92
internal/glfwwin: ignore the error at SetProcessDpiAwarenessContext
...
Updates #2113
2022-06-01 23:11:06 +09:00
Hajime Hoshi
285a5cbc69
internal/glfwwin: skip some functions for Xbox
...
Updates #2084
2022-06-01 12:08:03 +09:00
Hajime Hoshi
0adb0c3860
internal/ui: bug fix: compile error
2022-06-01 02:09:10 +09:00
Hajime Hoshi
9c15bda275
internal/ui: return a null Window on Xbox
...
Updates #2084
2022-06-01 01:26:31 +09:00
Hajime Hoshi
ff868ba39f
internal/ui: skip some functions for Xbox
...
Updates #2084
2022-06-01 00:58:36 +09:00
Hajime Hoshi
dcb5bb47c6
internal/glfw: unify the naming convension for Win32API
2022-06-01 00:48:22 +09:00
Hajime Hoshi
6fc71e97bb
internal/glfwwin: skip some functions for Xbox
...
Updates #2084
2022-06-01 00:35:43 +09:00
Hajime Hoshi
aa4a2b64e0
internal/glfwwin: bug fix: update _glfw.windows
2022-06-01 00:01:07 +09:00
Hajime Hoshi
c99b948df3
internal/graphicsdriver/directx: refactoring
...
Updates #2084
2022-05-30 03:17:15 +09:00
Hajime Hoshi
d4226659ee
internal/graphicsdriver/directx: initialize a device for Xbox
...
Updates #1162
2022-05-30 02:10:18 +09:00
Hajime Hoshi
59798d29f4
internal/graphicsdriver/directx: defer the initialization
2022-05-29 22:02:39 +09:00
Hajime Hoshi
b4491ab94d
internal/graphicsdriver/directx: unify the naming convention with glfwwin
2022-05-29 21:18:23 +09:00
Hajime Hoshi
0081fa7a47
internal/graphicsdriver/directx: add a comment
2022-05-29 20:05:37 +09:00
Hajime Hoshi
ad380a32f4
internal/glfwwin: split GDK part to a new package internal/microsoftgdk
...
Updates #1162
2022-05-29 19:25:26 +09:00
Hajime Hoshi
7f46938ff7
internal/glfwwin: return an error at initWGL on Xbox
...
Updates #1162
2022-05-29 17:37:06 +09:00
Hajime Hoshi
59e6d4578b
internal/glfw: skip some Win32APIs for Xbox
...
Updates #1162
2022-05-29 17:04:47 +09:00
Hajime Hoshi
ce147a7e38
internal/glfwwin: refactoring: remove Monitor.currentMode
2022-05-29 16:00:18 +09:00