mirror of https://github.com/liamg/aminal.git
Merge pull request #109 from liamg/darwin-blank-window-workaround
Add workaround for darwin SDL blank window bug
This commit is contained in:
commit
06c5ca65b1
|
@ -215,6 +215,8 @@ func (gui *GUI) Render() error {
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
showMessage := true
|
showMessage := true
|
||||||
|
|
||||||
|
darwinRenderFixRequired := runtime.GOOS == "darwin"
|
||||||
|
|
||||||
for !gui.window.ShouldClose() {
|
for !gui.window.ShouldClose() {
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
@ -269,6 +271,12 @@ Buffer Size: %d lines
|
||||||
|
|
||||||
gui.window.SwapBuffers()
|
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