def test_create_with_shader_true(self):
     settings = snes.config
     settings.update(recalSettings.loadAll('snes'))
     retroconf = libretroConfig.createLibretroConfig(snes)
     self.assertEquals(retroconf['video_shader'], 'myshaderfile.gplsp')
     self.assertEquals(retroconf['video_shader_enable'], 'true')
     self.assertEquals(retroconf['video_smooth'], 'false')
 def test_create_with_shader_true(self):
     settings = snes.config
     settings.update(recalSettings.loadAll('snes'))
     retroconf = libretroConfig.createLibretroConfig(snes)
     self.assertEquals(retroconf['video_shader'], 'myshaderfile.gplsp')
     self.assertEquals(retroconf['video_shader_enable'], 'true')
     self.assertEquals(retroconf['video_smooth'], 'false')
 def test_load_dict(self):
     name = "snes"
     loaded = recalSettings.loadAll(name)
     self.assertEquals(4, len(loaded))
     self.assertEquals('myshaderfile.gplsp', loaded["shaders"])
 def test_smooth_override_defaut_and_global(self):
     settings = snes.config
     settings.update(recalSettings.loadAll('snes'))
     retroconf = libretroConfig.createLibretroConfig(snes)
     self.assertEquals(retroconf['video_smooth'], 'false')
Example #5
0
emulators["prboom"] = Emulator(name='prboom',
                               emulator='libretro',
                               core='prboom')
emulators["psx"] = Emulator(name='psx',
                            emulator='libretro',
                            core='pcsx_rearmed')

# Read the controller configuration
playersControllers = controllers.loadControllerConfig(
    args.p1index, args.p1guid, args.p1name, args.p2index, args.p2guid,
    args.p2name, args.p3index, args.p3guid, args.p3name, args.p4index,
    args.p4guid, args.p4name)

systemName = args.system

# Main Program
# A generator will configure its emulator, and return a command
if systemName in emulators:
    system = emulators[systemName]
    # Get the default configuration of the core
    systemSettings = system.config
    # Override the config with the global one
    systemSettings.update(recalSettings.loadAll('global'))
    # Override the config with the core specific one
    systemSettings.update(recalSettings.loadAll(system.name))

    command = generators[system.config['emulator']].generate(
        system, args.rom, playersControllers)
    runner.runCommand(command)
    time.sleep(1)
emulators["atari2600"] = Emulator(name='atari2600', emulator='libretro', core='stella')
emulators["atari7800"] = Emulator(name='atari7800', emulator='libretro', core='prosystem')
emulators["msx"] = Emulator(name='msx', emulator='libretro', core='fmsx')
emulators["prboom"] = Emulator(name='prboom', emulator='libretro', core='prboom')
emulators["psx"] = Emulator(name='psx', emulator='libretro', core='pcsx_rearmed')




# Read the controller configuration
playersControllers = controllers.loadControllerConfig(args.p1index, args.p1guid, args.p1name, args.p2index, args.p2guid,
                                                      args.p2name, args.p3index, args.p3guid, args.p3name, args.p4index,
                                                      args.p4guid, args.p4name)

systemName = args.system

# Main Program
# A generator will configure its emulator, and return a command
if systemName in emulators:
    system = emulators[systemName]
    # Get the default configuration of the core
    systemSettings = system.config
    # Override the config with the global one
    systemSettings.update(recalSettings.loadAll('global'))
    # Override the config with the core specific one
    systemSettings.update(recalSettings.loadAll(system.name))

    command = generators[system.config['emulator']].generate(system, args.rom, playersControllers)
    runner.runCommand(command)
    time.sleep(1)
 def test_smooth_override_defaut_and_global(self):
     settings = snes.config
     settings.update(recalSettings.loadAll('snes'))
     retroconf = libretroConfig.createLibretroConfig(snes)
     self.assertEquals(retroconf['video_smooth'], 'false')
 def test_load_dict(self):
     name = "snes"
     loaded = recalSettings.loadAll(name)
     self.assertEquals(4, len(loaded))
     self.assertEquals('myshaderfile.gplsp', loaded["shaders"])