Merge DroidDeck 0.5.0 into the non-Adreno test branch

Conflicts kept both sides: the 0.5.0 GPU drivers redesign (Auto / pair / mix modes, rollback of
a pair that never starts a session) with the test branch's Mali, PowerVR and Xclipse rules (Mali
display on the phone's own driver, bridge and system-Vulkan fallbacks, 1-hour list refresh for the
open drivers); the test branch's Update button for rebuilt open pairs moved into 0.5.0's new GPU
drivers panel; Venus GL probing, the Mali compatibility layer and oom_score_adj redirect kept with
0.5.0's x86-64 Steam client, VAC diagnostics and caller-aware preload hooks.
This commit is contained in:
The412Banner committed 2026-10-19 08:51:42 +00:00
commit bab999038f
616 files changed
+83918 -2233

No files matched your search

+16 -32
View File
@@ -220,6 +220,12 @@ class GameEnvironmentTest(unittest.TestCase):
self.assertEqual(env["REMOVE"], "inherited")
self.assertEqual(MODULE["apply_config"](env, config, "43")["CUSTOM"], "shared")
def test_a_games_wine_sync_choice_also_reaches_its_setup_runs(self):
env = {"BL_SYNC": "1", "BL_SYNC_FALLBACK": "1", "BL_FSYNC_FIRST": "0", "OTHER": "kept"}
config = {"version": 1, "games": {"42": {"BL_SYNC": "0", "BL_FSYNC_FIRST": "1", "PROTON_NO_ESYNC": "1", "FEX_TSOENABLED": "1"}}}
chosen = MODULE["apply_config"](env, MODULE["sync_config"](config, "42"), "42")
self.assertEqual(chosen, {"BL_SYNC": "0", "BL_SYNC_FALLBACK": "1", "BL_FSYNC_FIRST": "1", "PROTON_NO_ESYNC": "1", "OTHER": "kept"})
def test_component_profiles_override_general_and_restore_it_for_the_next_game(self):
with tempfile.TemporaryDirectory() as tmp:
root = Path(tmp)
@@ -729,7 +735,7 @@ class ProtonDefaultTest(unittest.TestCase):
(root / "state.json").write_text(json.dumps({
"default": self.TOOL,
"auto": {},
"native": [app],
"native_choices": [app],
}))
globals_ = COMPAT["register_default"].__globals__
@@ -741,7 +747,7 @@ class ProtonDefaultTest(unittest.TestCase):
self.assertEqual(mapping_of(config.read_text()), {"0": self.TOOL})
state = json.loads((root / "state.json").read_text())
self.assertEqual(state["auto"], {})
self.assertEqual(state["native"], [app])
self.assertEqual(state["native_choices"], [app])
finally:
globals_["native_targets"] = original_native_targets
@@ -758,7 +764,7 @@ class ProtonDefaultTest(unittest.TestCase):
(root / "state.json").write_text(json.dumps({
"default": self.TOOL,
"auto": {},
"native": [app],
"native_choices": [app],
}))
globals_ = COMPAT["register_default"].__globals__
@@ -769,12 +775,12 @@ class ProtonDefaultTest(unittest.TestCase):
try:
COMPAT["register_default"](
str(config), [app], catalog=self.CATALOG, directory=tmp)
self.assertEqual(json.loads((root / "state.json").read_text())["native"], [app])
self.assertEqual(json.loads((root / "state.json").read_text())["native_choices"], [app])
COMPAT["register_default"](
str(config), [added_shortcut], catalog=self.CATALOG, directory=tmp)
state = json.loads((root / "state.json").read_text())
self.assertEqual(state["native"], [app])
self.assertEqual(state["native_choices"], [app])
self.assertEqual(state["auto"], {added_shortcut: self.TOOL})
self.assertEqual(mapping_of(config.read_text()), {
"0": self.TOOL,
@@ -820,7 +826,7 @@ class ProtonDefaultTest(unittest.TestCase):
self.assertEqual(COMPAT["tokenize"](first.decode()),
COMPAT["tokenize"](config_text([("0", self.TOOL)])))
self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["auto"], {})
self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native"], ["427520"])
self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native_choices"], ["427520"])
COMPAT["register_default"](
str(config), ["427520"], catalog=self.CATALOG, directory=tmp)
@@ -832,7 +838,7 @@ class ProtonDefaultTest(unittest.TestCase):
native_choice = config.read_bytes()
self.assertEqual(mapping_of(native_choice.decode()), {"0": self.TOOL, "427520": ""})
self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["auto"], {})
self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native"], ["427520"])
self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native_choices"], ["427520"])
COMPAT["register_default"](
str(config), ["427520"], catalog=self.CATALOG, directory=tmp)
self.assertEqual(config.read_bytes(), native_choice)
@@ -842,10 +848,10 @@ class ProtonDefaultTest(unittest.TestCase):
COMPAT["register_default"](
str(config), ["427520"], catalog=self.CATALOG, directory=tmp)
self.assertEqual(mapping_of(config.read_text()), {"0": self.TOOL, "427520": choice})
self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native"], [])
self.assertEqual(json.loads((Path(tmp) / "state.json").read_text())["native_choices"], [])
state = json.loads((Path(tmp) / "state.json").read_text())
state["native"] = ["427520"]
state["native_choices"] = ["427520"]
state["auto"] = {}
(Path(tmp) / "state.json").write_text(json.dumps(state))
config.write_text(config_text([("0", self.TOOL), ("427520", "proton_experimental")]))
@@ -853,7 +859,7 @@ class ProtonDefaultTest(unittest.TestCase):
str(config), ["427520"], catalog=self.CATALOG, directory=tmp)
self.assertEqual(mapping_of(config.read_text()), {"0": self.TOOL, "427520": self.TOOL})
saved = json.loads((Path(tmp) / "state.json").read_text())
self.assertEqual(saved["native"], [])
self.assertEqual(saved["native_choices"], [])
self.assertEqual(saved["auto"], {"427520": self.TOOL})
finally:
globals_["appinfo_platforms"] = original_platforms
@@ -1160,28 +1166,6 @@ if __name__ == "__main__":
unittest.main()
class StartWithoutSteamTest(unittest.TestCase):
def test_start_without_steam_uses_umu_or_runinprefix_and_only_when_asked(self):
with tempfile.TemporaryDirectory() as tmp:
ge = Path(tmp) / "ge/proton"
ge.parent.mkdir()
ge.write_text('if "UMU_ID" in os.environ:\n argv = [wine, "c:\\\\windows\\\\system32\\\\umu.exe"]\n')
valve = Path(tmp) / "valve/proton"
valve.parent.mkdir()
valve.write_text('argv = [wine, "c:\\\\windows\\\\system32\\\\steam.exe"]\n')
start = MODULE["start_without_steam"]
game = [str(ge), "waitforexitandrun", "/games/Game.exe", "-windowed"]
self.assertEqual(start(game, {}, "3384071994"), (game, {}))
on = {"DROIDDECK_NO_STEAM": "1"}
self.assertEqual(start(game, on, "3384071994"), (game, dict(on, UMU_ID="0")))
self.assertEqual(start(game, on, "570940")[1]["UMU_ID"], "570940")
self.assertEqual(start(game, dict(on, UMU_ID="umu-1"), "570940")[1]["UMU_ID"], "umu-1")
plain = [str(valve)] + game[1:]
self.assertEqual(start(plain, on, "570940"), ([str(valve), "runinprefix", "/games/Game.exe", "-windowed"], on))
for other in ([str(ge), "run", "/x.exe"], [str(ge), "waitforexitandrun"], [str(valve), "getcompatpath", "/x"]):
self.assertEqual(start(other, on, "570940"), (other, on))
class ForceSsbsTest(unittest.TestCase):
def test_libssbs_is_preloaded_only_when_asked_and_only_into_arm64_proton(self):
with tempfile.TemporaryDirectory() as tmp: