Added resolution support

This commit is contained in:
Max le Fou 2017-12-27 22:40:46 +01:00 committed by Mathieu Comandon
parent bb3bc1226c
commit 6b0654291b

View file

@ -30,12 +30,39 @@ class jzintv(Runner):
"option": "fullscreen",
"type": "bool",
"label": "Fullscreen"
},
# Adds the resoluton menu chooser
# jzintv has some resolution presets with the command -z
# going from -z0 to -z7. Some details on those presets
# are unknown and just speculated
{
"option": "resolution",
"type": "choice",
"label": "Resolution",
"choices": (
("320 x 200 (default)", "0"),
("640 x 480", "1"),
("800 x 600", "2"),
("1024 x 768", "3"),
("1152 x 864 ?", "4"),
("1280 x 1024 ?", "5"),
("1600 x 1200 ?", "6"),
("1920 x 1080 ?", "7"),
)
}
############################################################
]
def play(self):
"""Run Intellivision game"""
arguments = [self.get_executable()]
# Treatment of the choosen resolution
selected_resolution = self.runner_config.get("resolution")
if selected_resolution:
arguments = arguments + ["-z%s" % selected_resolution]
#####################################
if self.runner_config.get("fullscreen"):
arguments = arguments + ["-f"]
bios_path = self.runner_config.get("bios_path", '')