mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Improve Flatpak support for ScummVM
This commit is contained in:
parent
5158fc37eb
commit
a9f0dfabbf
|
@ -49,7 +49,7 @@ class scummvm(Runner):
|
||||||
platforms = [_("Linux")]
|
platforms = [_("Linux")]
|
||||||
runnable_alone = True
|
runnable_alone = True
|
||||||
runner_executable = "scummvm/bin/scummvm"
|
runner_executable = "scummvm/bin/scummvm"
|
||||||
# flatpak_id = "org.scummvm.ScummVM" # needs some adjustments + testing
|
flatpak_id = "org.scummvm.ScummVM"
|
||||||
game_options = [
|
game_options = [
|
||||||
{
|
{
|
||||||
"option": "game_id",
|
"option": "game_id",
|
||||||
|
@ -481,8 +481,10 @@ class scummvm(Runner):
|
||||||
return path if system.path_exists(path) else ""
|
return path if system.path_exists(path) else ""
|
||||||
|
|
||||||
def get_command(self):
|
def get_command(self):
|
||||||
return [
|
command = super().get_command()
|
||||||
self.get_executable(),
|
if "flatpak" in command[0]:
|
||||||
|
return command
|
||||||
|
return command + [
|
||||||
"--extrapath=%s" % self.get_scummvm_data_dir(),
|
"--extrapath=%s" % self.get_scummvm_data_dir(),
|
||||||
"--themepath=%s" % self.get_scummvm_data_dir(),
|
"--themepath=%s" % self.get_scummvm_data_dir(),
|
||||||
]
|
]
|
||||||
|
@ -530,8 +532,10 @@ class scummvm(Runner):
|
||||||
|
|
||||||
def get_game_list(self):
|
def get_game_list(self):
|
||||||
"""Return the entire list of games supported by ScummVM."""
|
"""Return the entire list of games supported by ScummVM."""
|
||||||
with subprocess.Popen([self.get_executable(), "--list-games"],
|
with subprocess.Popen(self.get_command() + ["--list-games"],
|
||||||
stdout=subprocess.PIPE, encoding="utf-8", universal_newlines=True) as scummvm_process:
|
stdout=subprocess.PIPE,
|
||||||
|
encoding="utf-8",
|
||||||
|
universal_newlines=True) as scummvm_process:
|
||||||
scumm_output = scummvm_process.communicate()[0]
|
scumm_output = scummvm_process.communicate()[0]
|
||||||
game_list = str.split(scumm_output, "\n")
|
game_list = str.split(scumm_output, "\n")
|
||||||
game_array = []
|
game_array = []
|
||||||
|
|
Loading…
Reference in a new issue