mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +01:00
devicescale: Bug fix: Base-scale should be multiplied on Cinnamon
Updates #1307
This commit is contained in:
parent
65759f33a3
commit
da94f3c2cb
@ -41,7 +41,7 @@ func cinnamonScaleFromXML() (float64, error) {
|
|||||||
type cinnamonMonitors struct {
|
type cinnamonMonitors struct {
|
||||||
XMLName xml.Name `xml:"monitors"`
|
XMLName xml.Name `xml:"monitors"`
|
||||||
Version string `xml:"version,attr"`
|
Version string `xml:"version,attr"`
|
||||||
Configuration struct {
|
Configuration []struct {
|
||||||
BaseScale float64 `xml:"base_scale"`
|
BaseScale float64 `xml:"base_scale"`
|
||||||
Output []struct {
|
Output []struct {
|
||||||
Scale float64 `xml:"scale"`
|
Scale float64 `xml:"scale"`
|
||||||
@ -67,17 +67,15 @@ func cinnamonScaleFromXML() (float64, error) {
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
scale := monitors.Configuration.BaseScale
|
// TODO: Choose the correct configuration.
|
||||||
for _, v := range monitors.Configuration.Output {
|
c := monitors.Configuration[0]
|
||||||
|
for _, v := range c.Output {
|
||||||
// TODO: Get the monitor at the specified position.
|
// TODO: Get the monitor at the specified position.
|
||||||
if v.Primary {
|
if v.Primary && v.Scale != 0.0 {
|
||||||
if v.Scale != 0.0 {
|
return c.BaseScale * v.Scale, nil
|
||||||
scale = v.Scale
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return scale, nil
|
return c.BaseScale, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func cinnamonScale() float64 {
|
func cinnamonScale() float64 {
|
||||||
|
Loading…
Reference in New Issue
Block a user