mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
parent
9142a077cf
commit
eac00c3d83
@ -107,14 +107,9 @@ func initialize() error {
|
|||||||
|
|
||||||
currentUI.window.MakeContextCurrent()
|
currentUI.window.MakeContextCurrent()
|
||||||
|
|
||||||
mode := glfw.CursorNormal
|
|
||||||
if !currentUI.isInitCursorVisible() {
|
|
||||||
mode = glfw.CursorHidden
|
|
||||||
}
|
|
||||||
if i := currentUI.getInitIconImages(); i != nil {
|
if i := currentUI.getInitIconImages(); i != nil {
|
||||||
currentUI.window.SetIcon(i)
|
currentUI.window.SetIcon(i)
|
||||||
}
|
}
|
||||||
currentUI.window.SetInputMode(glfw.CursorMode, mode)
|
|
||||||
|
|
||||||
currentUI.window.SetInputMode(glfw.StickyMouseButtonsMode, glfw.True)
|
currentUI.window.SetInputMode(glfw.StickyMouseButtonsMode, glfw.True)
|
||||||
currentUI.window.SetInputMode(glfw.StickyKeysMode, glfw.True)
|
currentUI.window.SetInputMode(glfw.StickyKeysMode, glfw.True)
|
||||||
@ -535,6 +530,13 @@ func DeviceScaleFactor() float64 {
|
|||||||
func Run(width, height int, scale float64, title string, g GraphicsContext, mainloop bool) error {
|
func Run(width, height int, scale float64, title string, g GraphicsContext, mainloop bool) error {
|
||||||
u := currentUI
|
u := currentUI
|
||||||
_ = mainthread.Run(func() error {
|
_ = mainthread.Run(func() error {
|
||||||
|
// Solve the initial properties of the window.
|
||||||
|
mode := glfw.CursorNormal
|
||||||
|
if !currentUI.isInitCursorVisible() {
|
||||||
|
mode = glfw.CursorHidden
|
||||||
|
}
|
||||||
|
u.window.SetInputMode(glfw.CursorMode, mode)
|
||||||
|
|
||||||
// Get the monitor before showing the window.
|
// Get the monitor before showing the window.
|
||||||
//
|
//
|
||||||
// On Windows, there are two types of windows:
|
// On Windows, there are two types of windows:
|
||||||
|
Loading…
Reference in New Issue
Block a user