mirror of https://github.com/liamg/aminal.git
Add workaround for darwin SDL blank window bug
This commit is contained in:
parent
a28ac522ff
commit
fd384fa2e6
|
@ -215,6 +215,8 @@ func (gui *GUI) Render() error {
|
|||
startTime := time.Now()
|
||||
showMessage := true
|
||||
|
||||
darwinRenderFixRequired := runtime.GOOS == "darwin"
|
||||
|
||||
for !gui.window.ShouldClose() {
|
||||
|
||||
select {
|
||||
|
@ -269,6 +271,12 @@ Buffer Size: %d lines
|
|||
|
||||
gui.window.SwapBuffers()
|
||||
|
||||
// Workaround for https://github.com/glfw/glfw/issues/1334
|
||||
if darwinRenderFixRequired {
|
||||
darwinRenderFixRequired = false
|
||||
x, y := gui.window.GetPos()
|
||||
gui.window.SetPos(x+1, y)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue