Fix errors on starting on Android

This commit is contained in:
Dmitrii Okunev
2024-10-31 00:42:47 +00:00
parent a50b017c87
commit b67e27f0a8
6 changed files with 38 additions and 7 deletions

View File

@@ -381,16 +381,19 @@ func (p *Panel) initStreamDConfig(
if err != nil {
return fmt.Errorf("unable to get the config: %w", err)
}
if cfg.Backends == nil {
cfg.Backends = make(streamcontrol.Config)
}
configHasChanged := false
// TODO: move the 'git' configuration here as well.
for _, platName := range []streamcontrol.PlatformName{
youtube.ID,
twitch.ID,
kick.ID,
obs.ID,
youtube.ID,
} {
if streamcontrol.IsInitialized(cfg.Backends, platName) {
continue

View File

@@ -0,0 +1,25 @@
//go:build android
// +build android
package windowmanagerhandler
import (
"context"
)
type PlatformSpecificWindowManagerHandler struct{}
type WindowID uint64
type PID uint64
type UID uint64
func (wmh *WindowManagerHandler) init() error {
return nil //fmt.Errorf("the support of window manager handler for this platform is not implemented, yet")
}
func (PlatformSpecificWindowManagerHandler) Close() error {
return nil
}
func (PlatformSpecificWindowManagerHandler) WindowFocusChangeChan(ctx context.Context) <-chan WindowFocusChange {
return nil
}

View File

@@ -1,5 +1,5 @@
//go:build linux
// +build linux
//go:build linux && !android
// +build linux,!android
package windowmanagerhandler

View File

@@ -1,3 +1,6 @@
//go:build linux && !android
// +build linux,!android
package windowmanagerhandler
import (

View File

@@ -1,5 +1,5 @@
//go:build linux
// +build linux
//go:build linux && !android
// +build linux,!android
package windowmanagerhandler

View File

@@ -1,5 +1,5 @@
//go:build !linux
// +build !linux
//go:build !linux && !android
// +build !linux,!android
package windowmanagerhandler