示例#1
0
def settings_emulators():
    emulators = []
    emulators_dict = settings.emulators()
    for name in emulators_dict.keys():
        emulator_data = emulators_dict[name]
        location = utils.idx(emulator_data, 'location', "")
        current_emulator = Emulator(name, location, emulator_data)
        if current_emulator.is_enabled(verbose=True):
            emulators.append(current_emulator)
    # After all of the invalid emulators have been removed, let the user know
    # which emulators have initialized successfully
    for emulator in emulators:
        ice_logger.log("Detected Emulator: %s" % emulator.name)
    return emulators
示例#2
0
def settings_emulators():
    emulators = []
    emulators_dict = settings.emulators()
    for name in emulators_dict.keys():
        emulator_data = emulators_dict[name]
        location = utils.idx(emulator_data, 'location', "")
        current_emulator = Emulator(name, location, emulator_data)
        if current_emulator.is_enabled(verbose=True):
            emulators.append(current_emulator)
    # After all of the invalid emulators have been removed, let the user know
    # which emulators have initialized successfully
    for emulator in emulators:
        ice_logger.log("Detected Emulator: %s" % emulator.name)
    return emulators
示例#3
0
def custom_emulators():
    global cached_emulators
    if cached_emulators is None:
        cached_emulators = {}
        emulator_data = settings.emulators()
        for name in emulator_data.keys():
            current = emulator_data[name]
            if 'location' not in current or current['location'] == "":
                log_both("No location set for '%s' in emulators.txt. Ignoring emulator" % name)
                continue
            if 'command' not in current or current['command'] == "":
                log_both("No command set for '%s' in emulators.txt. Ignoring emulator" % name)
                continue
            current_emulator = custom_emulator.CustomEmulator(name, current['location'], current['command'])
            log_both("Detected Emulator: %s" % name)
            cached_emulators[name] = current_emulator
    return cached_emulators
示例#4
0
文件: gui.py 项目: jzerbe/Ice
    def _loadSettings(self):
        try:
            for consoleentry in settings.consoles():
                if settings.consoles()[consoleentry]['emulator'] != '':
                    emulator = settings.consoles()[consoleentry]['emulator']

                    if consoleentry == 'Nintendo Entertainment System':
                        self.ui.pathNES.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdNES.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Super Nintendo':
                        self.ui.pathSNES.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdSNES.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Nintendo 64':
                        self.ui.pathN64.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdN64.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Nintendo Gamecube':
                        self.ui.pathGameCube.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdGameCube.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Nintendo Wii':
                        self.ui.pathWii.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdWii.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Playstation 1':
                        self.ui.pathPS1.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdPS1.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Playstation 2':
                        self.ui.pathPS2.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdPS2.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Sega Genesis':
                        self.ui.pathGenesis.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdGenesis.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Sega Dreamcast':
                        self.ui.pathDreamcast.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdDreamcast.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Nintendo Gameboy':
                        self.ui.pathGameBoy.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdGameBoy.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Gameboy Advance':
                        self.ui.pathGBA.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdGBA.setText(settings.emulators()[emulator]['command'])
                    elif consoleentry == 'Nintendo DS':
                        self.ui.pathNDS.setText(settings.emulators()[emulator]['location'])
                        self.ui.cmdNDS.setText(settings.emulators()[emulator]['command'])

        except:
            print 'An error occured while loading configs'
            return