mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
ui: Error prefix
This commit is contained in:
parent
59adc6979a
commit
ffb8a78e37
@ -34,15 +34,15 @@ func adjustScaleForGLFW(scale int) int {
|
|||||||
c := exec.Command("gsettings", "get", "org.gnome.desktop.interface", "scaling-factor")
|
c := exec.Command("gsettings", "get", "org.gnome.desktop.interface", "scaling-factor")
|
||||||
o, err := c.Output()
|
o, err := c.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("graphics: executing gsettings error %v", err))
|
panic(fmt.Sprintf("ui: executing gsettings error %v", err))
|
||||||
}
|
}
|
||||||
m := scalingFactorSyntax.FindStringSubmatch(string(o))
|
m := scalingFactorSyntax.FindStringSubmatch(string(o))
|
||||||
if m == nil {
|
if m == nil {
|
||||||
panic("graphics: gsettings result syntax is not expected")
|
panic("ui: gsettings result syntax is not expected")
|
||||||
}
|
}
|
||||||
s, err := strconv.Atoi(m[1])
|
s, err := strconv.Atoi(m[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("graphics: %v", err))
|
panic(fmt.Sprintf("ui: %v", err))
|
||||||
}
|
}
|
||||||
deviceScaleFactor = s
|
deviceScaleFactor = s
|
||||||
return scale * deviceScaleFactor
|
return scale * deviceScaleFactor
|
||||||
|
Loading…
Reference in New Issue
Block a user