mirror of
https://github.com/lutris/lutris
synced 2024-11-02 07:10:17 +00:00
added gens runner
This commit is contained in:
parent
226e2706e3
commit
1d4ed19d0d
3 changed files with 62 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
__all__ = ["linux","wine","sdlmame","mednafen",\
|
||||
"scummvm","cedega","snes9x", "steam",\
|
||||
"scummvm","cedega","snes9x","gens" ,"steam",\
|
||||
"uae","nulldc","vavoom","openmsx",\
|
||||
"dosbox","pcsx","o2em","jzintv","stella","atari800",\
|
||||
"frotz","browser",'osmose','vice','hatari']
|
||||
|
|
59
runners/gens.py
Normal file
59
runners/gens.py
Normal file
|
@ -0,0 +1,59 @@
|
|||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
|
||||
from runner import Runner
|
||||
import os.path
|
||||
|
||||
class gens(Runner):
|
||||
'''Runner for intellivision games'''
|
||||
|
||||
def __init__(self,settings = None):
|
||||
'''Constructor'''
|
||||
super(gens,self).__init__()
|
||||
self.package = "gens"
|
||||
self.executable = "gens"
|
||||
self.machine = "Sega Genesis"
|
||||
self.is_installable = True
|
||||
self.description = "AtariST emulator."
|
||||
|
||||
self.game_options = [ {"option": "rom", "type":"single", "label": "Rom File"}]
|
||||
|
||||
self.runner_options = [{"option": "fullscreen", "type":"bool", "label": "Fullscreen"},
|
||||
{"option": "quickexit", "type": "bool", "label": "Exit emulator with Esc"}]
|
||||
|
||||
if settings:
|
||||
if "fullscreen" in settings["gens"]:
|
||||
if settings["gens"]["fullscreen"]:
|
||||
self.arguments = self.arguments + ["--fs"]
|
||||
else:
|
||||
self.arguments = self.arguments + ["--window"]
|
||||
if "quickexit" in settings["gens"]:
|
||||
if settings["gens"]["quickexit"]:
|
||||
self.arguments = self.arguments + ["--quickexit"]
|
||||
|
||||
if "rom" in settings['game']:
|
||||
self.rom = settings['game']['rom']
|
||||
|
||||
def play(self):
|
||||
self.arguments = self.arguments + [ "--game \"%s\"" % self.rom ]
|
||||
command = [self.executable] + self.arguments
|
||||
return_val = { "command": command ,"error_messages": self.error_messages}
|
||||
return return_val
|
|
@ -21,9 +21,7 @@
|
|||
|
||||
from runner import Runner
|
||||
from lutris.desktop_control import LutrisDesktopControl
|
||||
import os
|
||||
import os.path
|
||||
import logging
|
||||
|
||||
class hatari(Runner):
|
||||
'''Runner for intellivision games'''
|
||||
|
@ -40,12 +38,6 @@ class hatari(Runner):
|
|||
self.game_options = [ {"option": "disk-a", "type":"single", "label": "Floppy Disk A"},
|
||||
{"option": "disk-b", "type":"single", "label": "Floppy Disk B"},
|
||||
]
|
||||
|
||||
self.screen_resolutions = []
|
||||
desktop_control = LutrisDesktopControl()
|
||||
resolutions_available = desktop_control.get_resolutions()
|
||||
for resolution in resolutions_available:
|
||||
self.screen_resolutions = self.screen_resolutions + [(resolution,resolution)]
|
||||
|
||||
joystick_choices = [('None','none'),('Keyboard','keys'),('Joystick','real')]
|
||||
|
||||
|
@ -56,7 +48,7 @@ class hatari(Runner):
|
|||
{"option": "status", "type": "bool", 'label': 'Display status bar'},
|
||||
{"option": "joy1", "type": "one_choice", "label": "Joystick 1", "choices": joystick_choices },
|
||||
{"option": "joy2", "type": "one_choice", "label": "Joystick 2", "choices": joystick_choices },
|
||||
]
|
||||
]
|
||||
|
||||
if settings:
|
||||
if "fullscreen" in settings["hatari"]:
|
||||
|
@ -90,9 +82,8 @@ class hatari(Runner):
|
|||
if "disk-a" in settings['game']:
|
||||
self.diska = settings['game']['disk-a']
|
||||
|
||||
|
||||
def play(self):
|
||||
self.arguments = self.arguments + [ "--disk-a \"%s\"" % self.diska ]
|
||||
command = [self.executable] + self.arguments
|
||||
return_val = { "command": command ,"error_messages": self.error_messages}
|
||||
return return_val
|
||||
return return_val
|
Loading…
Reference in a new issue