Skip to content

Commit

Permalink
config: warn user on multiple instances && inflatpak
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Feb 25, 2024
1 parent df7cf37 commit e37773e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ package config
import (
"errors"
"fmt"
"log/slog"
"os"
"os/exec"
"strings"

"github.com/BurntSushi/toml"
"github.com/vinegarhq/vinegar/roblox"
"github.com/vinegarhq/vinegar/splash"
"github.com/vinegarhq/vinegar/sysinfo"
"github.com/vinegarhq/vinegar/wine"
)

Expand Down Expand Up @@ -172,6 +174,14 @@ func (c *Config) setup() error {
SanitizeEnv()
}

// On each Flatpak instance, each one has their own wineserver, which means
// if a new Vinegar flatpak instance is ran, with the intent of having two
// running Player instances, one of the wineservers in either sandboxed
// instance will die.
if c.MultipleInstances && sysinfo.InFlatpak {
slog.Warn("Multiple instances is broken on Flatpak! Please consider using a source installation!")
}

c.Env.Setenv()

if err := c.Player.setup(); err != nil {
Expand Down

0 comments on commit e37773e

Please sign in to comment.