diff --git a/mainthread_all.go b/mainthread_all.go index d6f2233d..f7cbdc3b 100644 --- a/mainthread_all.go +++ b/mainthread_all.go @@ -1,5 +1,5 @@ -//go:build !darwin -// +build !darwin +//go:build !darwin && !windows +// +build !darwin,!windows package giu diff --git a/mainthread_windows.go b/mainthread_windows.go new file mode 100755 index 00000000..e38db0d6 --- /dev/null +++ b/mainthread_windows.go @@ -0,0 +1,13 @@ +//go:build windows +// +build windows + +package giu + +// TODO: I have no working mainthread library for windows. +// - this one for macOS crashes app immediately +// - this for linux (and everything else) freezes after a few seconds +// +// With no mianthread support this at least runs sometimes. Just keep your giu calls in one thread and everything should work. +func mainthreadCallPlatform(c func()) { + c() +}