Commit Graph

407 Commits

Author SHA1 Message Date
Hajime Hoshi
90f82de5ef glfw: Separate glfw-dependent part and the other part 2018-12-30 20:45:50 +09:00
Hajime Hoshi
55c2fa4de1 Use internal/glfw 2018-12-30 02:35:46 +09:00
Hajime Hoshi
83787123ac ui: Refactoring 2018-12-28 14:08:44 +09:00
Hajime Hoshi
b349efaa0a graphicsdriver/metal: Make main-thread usages more explicit 2018-12-28 02:43:00 +09:00
Hajime Hoshi
532488ac5c mainthread: RunLockOSThread is mainthread package's responsibility 2018-12-28 02:20:53 +09:00
Hajime Hoshi
c76ce28065 Revert "ui: Bug fix: SetVsyncEnabled before Run didn't work on macOS"
This reverts commit 042b30a516.
2018-12-28 02:18:38 +09:00
Hajime Hoshi
042b30a516 ui: Bug fix: SetVsyncEnabled before Run didn't work on macOS 2018-12-28 02:11:48 +09:00
Hajime Hoshi
4d0cc623fb ui: Rename functions 2018-12-22 02:32:02 +09:00
Hajime Hoshi
ff62876552 Add Metal implementation
Fixes #621
2018-12-20 02:37:10 +09:00
Hajime Hoshi
294bf855af ui: Fix logic: [NSApp mainWindow] can be nil when borderless 2018-12-19 02:25:12 +09:00
Hajime Hoshi
db4395d71b ui: Bug fix: ScreenSizeFullscreen before Run crashes on Linux 2018-12-19 01:21:00 +09:00
Hajime Hoshi
6ef5cc5857 ui: Bug fix: SetWindowDecorated didn't work
Fixes #753
2018-12-19 01:01:18 +09:00
Hajime Hoshi
b3ce89aab1 ui: Bug fix: SetWindowIcon before Run didn't work
Fixes #755
2018-12-18 23:16:09 +09:00
Hajime Hoshi
241ccc307f ui: Add comments about #753 2018-12-18 03:34:45 +09:00
Hajime Hoshi
eac00c3d83 ui: Bug fix: SetCursorVisible before Run didn't work
Fixes #754
2018-12-18 03:07:16 +09:00
Hajime Hoshi
2fd0daec10 ui: Fix comments 2018-12-04 03:10:54 +01:00
Hajime Hoshi
d2595c5be7 ui: Refactoring 2018-11-15 01:08:36 +09:00
Hajime Hoshi
e24f6b7848 graphicsdriver/opengl: Rename GetDriver -> Get 2018-11-13 00:01:26 +09:00
Hajime Hoshi
aff77d98e4 graphicsdriver/opengl: Bug fix: compile error on browsers and mobiles 2018-11-11 04:51:17 +09:00
Hajime Hoshi
241716d0e6 Add package graphicsdriver; Move opengl to graphicsdriver/opengl 2018-11-10 22:52:37 +09:00
Ben Echols
5e70fce639 Added monitor cache and scale cache (#731) 2018-11-07 20:54:37 +09:00
Hajime Hoshi
07ae1db0dd opengl: Add Driver 2018-11-07 01:43:07 +09:00
Hajime Hoshi
2c7017534f ui: Remove opengl dependency from ui package (desktop) 2018-11-05 01:24:53 +09:00
Hajime Hoshi
4090258904 opengl: Remove Init (except for mobile) 2018-11-05 00:21:39 +09:00
Hajime Hoshi
97a9e99112 opengl: Rename: BindScreenFramebuffer -> BeforeSwapping 2018-11-03 04:08:00 +09:00
Hajime Hoshi
7e29a81177 ui: Refactoring 2018-10-14 18:28:27 +09:00
Hajime Hoshi
0c4ef7ee8e ui: Bug fix: fix the initial window position on multiple monitors 2018-10-14 16:59:14 +09:00
Hajime Hoshi
b56061281d ui: Add comments 2018-10-13 22:41:21 +09:00
Hajime Hoshi
a073f48faf input: Bug fix: keypress event were not fired
This change suspends to 'preventDefault' on keydown events.

Now preventing navigation by pressing backspace is deprecated in
Chrome. For other keys, it looks like keyup's preventDefault is
enough to disable the browser default behavior.
2018-10-13 19:18:13 +09:00
Hajime Hoshi
34596bb1cf ui: Bug fix: IsVsyncEnabled can cause deadlock 2018-10-10 23:17:45 +09:00
Hajime Hoshi
b4a4b87b56 ui: Bug fix: ScreenSizeInFullscreen returned wrong scaled values
Fixes #708
2018-10-10 03:10:18 +09:00
Hajime Hoshi
e971f6d41c ui: Avoid glfw.GetCurrentContext for threading issues 2018-10-10 01:45:39 +09:00
Hajime Hoshi
b5344bc994 ui: glfwScale must be called on the main thread 2018-10-10 01:07:47 +09:00
Hajime Hoshi
c758a1f8c6 ui: Rename MonitorSize -> ScreenSizeInFullscreen (#708) 2018-10-09 23:42:03 +09:00
Hajime Hoshi
dbe71e81bd ui: Bug fix: currentMonitorPos returned wrong values on macOS
[NSScreen mainScreen] sometimes returned a wrong screen for the
window. Use [[NSApp mainWindow] screen] when possible.

Fixes #703
2018-10-08 05:40:07 +09:00
Hajime Hoshi
c4a066ecd0 ui: Fix wrong comments about Windows 2018-10-08 04:06:44 +09:00
Hajime Hoshi
8d2820efb0 ui: Bug fix: the window is shown on the current monitor on Windows
Fixes #704
2018-10-08 03:24:14 +09:00
Hajime Hoshi
96a657025f ui: Bug fix: DeviceScaleFactor and MonitorSize were not correct on Windows 2018-10-08 03:18:24 +09:00
Hajime Hoshi
9264e38324 ui: Add comments 2018-10-08 01:45:07 +09:00
Hajime Hoshi
f6c2d899f1 ui: Bug fix: compile error on browsers and mobiles 2018-10-08 01:26:05 +09:00
Hajime Hoshi
4a5548a4a0 ui: MonitorSize should return the 'current' monitor size instead of the primary monitor size 2018-10-08 01:15:57 +09:00
Hajime Hoshi
f3b7148564 ui: Bug fix: DeviceScaleFactor should return the current monitor's scale 2018-10-08 01:11:13 +09:00
Hajime Hoshi
16a9bac487 ui: Remove deviceScale struct 2018-10-08 01:03:18 +09:00
Hajime Hoshi
effd530026 ui: Show the window on the current monitor (#704)
Tested on macOS. This doesn't work on Windows yet since there are
some codes that depends on the primary monitor.
2018-10-08 00:46:01 +09:00
Hajime Hoshi
fb7a3f2736 ui: Bug fix: Call SetPos multiple times to render correctly (#703) 2018-10-08 00:25:21 +09:00
Hajime Hoshi
e0d2d5e753 ui: Bug fix: wrong scaling when a window move across monitors
Fixes #701
2018-10-07 23:05:20 +09:00
Hajime Hoshi
0e7dab3707 ui: Fix comment 2018-10-06 20:04:48 +09:00
Hajime Hoshi
f9edfd7d57 ui: Remove unused variables 2018-10-06 19:55:10 +09:00
Hajime Hoshi
cc336a4c38 ui: Use more stable way to determine the current monitor 2018-10-06 19:53:43 +09:00
Hajime Hoshi
55a397bd65 devicescale: Specify the monitor to get the scale
Fixes #695
2018-10-06 19:43:23 +09:00