mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
fix(bionic): keep a game's own steamclient when it starts without Steam
DroidDeck-Bionic set WINE_LSTEAMCLIENT=1 for every launch, so Wine replaced any steamclient(64).dll a game loads with lsteamclient, DroidDeck's bridge to its Steam client. A game set to "Start without Steam" has no Steam client behind the bridge; one that brings its own steamclient64.dll (a Steam emulator such as gbe_fork's ColdClient loader) quit after its splash screen because SteamAPI_Init failed. With DROIDDECK_NO_STEAM on, launch.sh now sets WINE_LSTEAMCLIENT=0 unless the player set a value, and keeps DROIDDECK_NO_STEAM in the environment it passes on.
This commit is contained in:
1 parent
f50691ebc9
commit
75d0ee3cb0
2 files changed
+40
-1
No files matched your search
@@ -86,6 +86,38 @@ class ToolArguments(unittest.TestCase):
|
||||
self.assertEqual(switches, {name: kept.get(name) for name in switches})
|
||||
self.assertNotIn('OTHER', kept)
|
||||
|
||||
def test_start_without_steam_reaches_wine(self):
|
||||
text = LAUNCH.read_text()
|
||||
block = text[text.index('KEEP="'):text.index('export PATH=/system/bin')]
|
||||
env = dict(PATH=os.environ['PATH'], DROIDDECK_BIONIC_KEEP='PATH', DROIDDECK_NO_STEAM='1')
|
||||
result = subprocess.run(['sh', '-c', block + 'env\n'], env=env, text=True, capture_output=True, check=True)
|
||||
self.assertIn('DROIDDECK_NO_STEAM=1', result.stdout.splitlines())
|
||||
|
||||
|
||||
def lsteamclient(**env):
|
||||
text = LAUNCH.read_text()
|
||||
on = re.search(r'^on\(\) \{.*\}$', text, re.M).group(0)
|
||||
last = 'export WINE_LSTEAMCLIENT=${WINE_LSTEAMCLIENT:-1}\n'
|
||||
block = text[text.index('# A game set to start without Steam'):text.index(last) + len(last)]
|
||||
script = on + '\n' + block + 'echo "value=$WINE_LSTEAMCLIENT"\n'
|
||||
result = subprocess.run(['sh', '-c', script], env=dict(env, PATH=os.environ['PATH']),
|
||||
text=True, capture_output=True, check=True)
|
||||
return result.stdout.splitlines()[-1].split('=', 1)[1]
|
||||
|
||||
|
||||
class SteamBridge(unittest.TestCase):
|
||||
def test_games_with_steam_use_lsteamclient(self):
|
||||
self.assertEqual('1', lsteamclient())
|
||||
self.assertEqual('1', lsteamclient(DROIDDECK_NO_STEAM='0'))
|
||||
|
||||
def test_a_game_started_without_steam_keeps_its_own_steamclient(self):
|
||||
for value in ('1', 'on', 'true', 'yes'):
|
||||
self.assertEqual('0', lsteamclient(DROIDDECK_NO_STEAM=value))
|
||||
|
||||
def test_the_players_value_wins(self):
|
||||
self.assertEqual('1', lsteamclient(DROIDDECK_NO_STEAM='1', WINE_LSTEAMCLIENT='1'))
|
||||
self.assertEqual('0', lsteamclient(WINE_LSTEAMCLIENT='0'))
|
||||
|
||||
|
||||
class SessionLogs(unittest.TestCase):
|
||||
SESSION = '/data/user/0/com.droiddeck.launcher/files/logs/2026-11-22-09-steam'
|
||||
|
||||
Reference in new issue
Block a user