Hajime Hoshi
ec2f823420
internal/uidriver/glfw: Clear the device scale cache when monitors are changed
2021-09-15 13:04:38 +09:00
divVerent
5bc7b93e6f
Move VideoModeScaleAt into internal/uidriver/glfw. ( #1812 )
...
It's only used by GLFW, and has been in devicescale only to ease migration
to separate video mode vs content scaling.
Updates #1774
2021-09-15 12:47:04 +09:00
divVerent
923c84a3d6
Split the concept of device scale and screen scale ( #1811 )
...
We now set deviceScale to always the mapping from logical window system pixels
to device independent pixels (which is what Ebiten API users expect), and
introduce a new concept of videoModeScale that maps from video mode to logical
window system pixels.
videoModeScale is now only used for computing full-screen resolutions, while
deviceScale is used for any other conversion.
Fixes window sizes on X11, should be a NOP otherwise.
Closes #1774 .
2021-09-15 01:03:04 +09:00
divVerent
60df512352
Switch out the devicescale implementation by one that relies on glfw/xrandr. ( #1800 )
...
This should fix fullscreen mode on Linux/X11 systems in general,
while not affecting other systems.
Note that this deletes a bunch of OS X specific and Windows specific code,
as GLFW already provides this functionality.
This change is not expected to cause regressions, however,
the current behavior is still wrong and leads to wrong/unintended window sizes.
To be fixed in further PRs.
Updates #1774
2021-09-14 12:35:02 +09:00
Hajime Hoshi
b54ad73a2b
Add go:build comments with go1.17beta1 fmt
2021-06-11 01:11:46 +09:00
corfe83
d24313e236
internal/devicescale: Fallback to simpler logic when trying to get DPI from monitor and failing ( #1600 )
...
Closes #1612
2021-04-21 11:43:23 +09:00
Hajime Hoshi
1ca0ecc10f
internal/devicescale: Add comment about #1573
...
Updates #1573
2021-04-17 18:14:26 +09:00
Hajime Hoshi
e89f53774c
internal/uidriver/glfw, internal/devicescale: Add comments
2021-04-17 15:45:46 +09:00
Hajime Hoshi
9dd00114c5
internal/devicescale: Remove a Unicode space
2021-03-28 23:39:06 +09:00
Hajime Hoshi
acb8bcae38
cmd/ebitenmobile, internal/devicescale: Experimental fix of the display density
...
Closes #1481
2021-02-07 14:07:06 +09:00
Hajime Hoshi
2106e0fa6a
devicescale: Use devicePixelRatio property for go2cpp
2020-12-20 00:45:13 +09:00
Hajime Hoshi
5897e1ab7c
Implement some preparation code for go2cpp
...
Updates #744
2020-11-30 23:18:42 +09:00
Hajime Hoshi
ee4ebaaa95
Clean up the 'js' build tags
...
Updates #1129
2020-10-07 02:07:03 +09:00
Hajime Hoshi
7a0e31a23a
Clean up the 'js' build tags
...
Updates #1129
2020-10-07 01:33:10 +09:00
Hajime Hoshi
bf515bb594
Update version to v2.0.0-alpha
2020-10-04 04:30:40 +09:00
Hajime Hoshi
632b985448
devicescale: Ignore the base scale
...
The window might be too bit when the base scale is 2.
Updates #1307
Updates #1350
2020-09-18 03:48:42 +09:00
Hajime Hoshi
5f3d6dbc19
devicescale: Choose the correct Cinnamon monitor configuration
...
Updates #1307
2020-09-18 01:07:48 +09:00
Hajime Hoshi
da94f3c2cb
devicescale: Bug fix: Base-scale should be multiplied on Cinnamon
...
Updates #1307
2020-09-18 00:19:16 +09:00
Hajime Hoshi
65759f33a3
devicescale: Refactoring
2020-09-18 00:11:18 +09:00
Hajime Hoshi
de4ff71544
devicescale: Read ~/.config/cinnamon-monitors.xml on Cinnamon
...
Updates #1307
2020-09-12 19:15:11 +09:00
Hajime Hoshi
5e4e76d75c
devicescale: Fix comments
2020-03-28 16:31:38 +09:00
Hajime Hoshi
d16477617e
devicescale: Bug fix: Wrong calculation to convert Y
...
Updates #807
Fixes #1113
2020-03-28 16:27:58 +09:00
Hajime Hoshi
9a31bcd53d
devicescale: Remove the updating loop
...
Now the value is cached, the updating loop is no longer needed.
2019-05-08 01:14:22 +09:00
Hajime Hoshi
836e320b6b
devicescale: Refactoring
2019-05-05 18:09:49 +09:00
Hajime Hoshi
10fb5e33be
Replace GopherWasm with syscall/js
...
Fixes #857
2019-05-01 17:28:00 +09:00
Hajime Hoshi
bf165ae9d4
devicescale: Refactoring
2019-04-03 23:20:45 +09:00
Hajime Hoshi
0d0b347411
devicescale: Use more runtime.KeepAlive for Windows
2019-04-03 11:57:00 +09:00
Hajime Hoshi
8005682786
devicescale: Use runtime.KeepAlive for Windows
...
This might be related to the bug #832
2019-04-03 11:53:23 +09:00
Hajime Hoshi
1392129e41
devicescale: Cache scale values
2019-03-12 01:31:18 +09:00
Hajime Hoshi
4273f1982d
devicescale: Bug fix: Need to consider Y axis direction on macOS
...
Fixes #807
2019-02-10 23:34:15 +09:00
Hajime Hoshi
f2dcc8ccdb
devicescale: Use NewLazySystemDLL instead of NewLazyDLL ( #766 )
2019-01-04 06:11:59 +09:00
Hajime Hoshi
db1b664424
devicescale: Refactoring: define Windows error consts
2019-01-04 06:05:35 +09:00
Hajime Hoshi
75a024e40e
devicescale: Bug fix: GetWindowDC returns error on Wine
...
Fixes #743
2019-01-04 05:58:34 +09:00
Hajime Hoshi
5c1b0bbcec
devicescale: Remove 'syscall' package usages ( #766 )
2019-01-04 05:53:18 +09:00
Hajime Hoshi
d165673789
devicescale: Bug fix: Crash on Wine
...
GetWindowDC(0) doesn't work on Wine. Let that return an arbitrary
scale 1 in this case.
Fixes #738
2018-11-24 16:37:30 +09:00
Ben Echols
5e70fce639
Added monitor cache and scale cache ( #731 )
2018-11-07 20:54:37 +09:00
Hajime Hoshi
faf32b9d37
devicescale: Plan 9 support
2018-10-13 04:08:40 +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
e0d2d5e753
ui: Bug fix: wrong scaling when a window move across monitors
...
Fixes #701
2018-10-07 23:05:20 +09:00
Hajime Hoshi
55a397bd65
devicescale: Specify the monitor to get the scale
...
Fixes #695
2018-10-06 19:43:23 +09:00
Hajime Hoshi
8771d27d64
devicescale: Rename variables
2018-10-06 17:29:40 +09:00
Hajime Hoshi
1807a3f530
devicescale: Rename function
2018-10-04 01:28:53 +09:00
Hajime Hoshi
11d23bafa9
devicescale: Bug fix: the active window can't be passed to ReleaseDC
2018-10-03 04:16:28 +09:00
Hajime Hoshi
eef9c01735
gofmt -s -w
2018-10-03 03:25:44 +09:00
Hajime Hoshi
cf41e0aa0a
devicescale: Rename logPixelSx -> logPixelsX
2018-10-03 03:13:36 +09:00
Hajime Hoshi
399317a2cf
devicescale: Get the current monitor's scale on Windows ( #644 )
2018-10-03 03:09:42 +09:00
Hajime Hoshi
21c1ee5dfb
ui: Cache devicescale value on mobiles
2018-10-02 03:51:13 +09:00
Hajime Hoshi
bf850e12a4
ui: Recalc device scale repeatedly for multiple displays ( #644 )
2018-10-02 02:49:08 +09:00
Hajime Hoshi
ed99719fdb
devicescale: Use app.RunOnJVM and remove internal/jni
2018-08-06 23:50:37 +09:00
Hajime Hoshi
af77a17aaa
devicescale: Use mainScreen instead of screens[0] to get the 'current' screen state
2018-08-05 19:18:40 +09:00