tons of new build options, fix mutex shit, etc

This commit is contained in:
KingKDot
2026-03-21 02:12:35 -05:00
parent 26f5d4ecc6
commit ac5cf6e43e
14 changed files with 714 additions and 606 deletions
@@ -20,6 +20,12 @@ func Acquire(name string) (func(), bool, error) {
fullName := "Global\\Overlord-" + sanitized
handle, err := windows.CreateMutex(nil, false, windows.StringToUTF16Ptr(fullName))
if err == windows.ERROR_ALREADY_EXISTS {
if handle != 0 {
windows.CloseHandle(handle)
}
return func() {}, false, nil
}
if err != nil {
return nil, false, fmt.Errorf("create mutex: %w", err)
}