Ejemplo n.º 1
0
 def test_padtype_dual2(self):
     basicController = controllersConfig.Controller("contr1", "joypad",
                                                    "GUID1", '1', "0",
                                                    "Joypad1RealName",
                                                    axisAndBtnsInputs)
     padtype = libretroControllers.getAnalogMode(basicController, snes)
     self.assertEqual("1", padtype)
Ejemplo n.º 2
0
 def test_padtype_only_joystick(self):
     basicController = controllersConfig.Controller("contr1", "joypad",
                                                    "GUID1", '1', "0",
                                                    "Joypad1RealName",
                                                    onlyAxisInputs)
     padtype = libretroControllers.getAnalogMode(basicController, snes)
     self.assertEqual("0", padtype)
Ejemplo n.º 3
0
    def setUp(self):
        self.snes = Emulator(name='snes',
                             videomode='4',
                             core='pocketsnes',
                             shaders='',
                             ratio='auto',
                             smooth='2',
                             rewind='false',
                             emulator='libretro')
        self.snes2 = Emulator(name='snes',
                              videomode='4',
                              core='pocketsnes',
                              shaders='',
                              ratio='auto',
                              smooth='2',
                              rewind='false',
                              emulator='libretro')
        self.nes = Emulator(name='nes',
                            videomode='6',
                            core='catsfc',
                            shaders='',
                            ratio='16/9',
                            smooth='1',
                            rewind='false',
                            configfile='/myconfigfile.cfg',
                            emulator='libretro')

        # test inputs
        self.basicInputs1 = {
            'hotkey': controllersConfig.Input("hotkey", "button", "10", "1",
                                              "")
        }
        self.basicController1 = controllersConfig.Controller(
            "contr1", "joypad", "GUID1", 1, 0, "Joypad1RealName",
            self.basicInputs1)

        self.sdl2controler = controllersConfig.Controller(
            "contr1", "joypad", "030000003512000012ab000010010000", 2, 1,
            "Bluetooth Wireless Controller   ", self.basicInputs1)
        self.controllers = dict()
        self.controllers['1'] = self.basicController1

        self.sdl2controllers = dict()
        self.sdl2controllers['1'] = self.basicController1
        self.sdl2controllers['2'] = self.sdl2controler
Ejemplo n.º 4
0
controllersConfig.esInputs = os.path.abspath(
    os.path.join(os.path.dirname(__file__), "tmp/es_input.cfg"))

# Injecting test retroarch.conf
libretroSettingsFile = os.path.abspath(
    os.path.join(os.path.dirname(__file__), "tmp/retroarchcustom.cfg"))
libretroSettings = unixSettings.UnixSettings(libretroSettingsFile, ' ')
libretroControllers.libretroSettings = libretroSettings

# Test objects
basicInputs1 = {
    'a': controllersConfig.Input("a", "button", "10", "1"),
    'start': controllersConfig.Input("start", "button", "11", "1")
}
basicController1 = controllersConfig.Controller("contr1", "joypad", "GUID1",
                                                '1', 0, "Joypad1RealName",
                                                basicInputs1)
basicController2 = controllersConfig.Controller("contr2", "joypad", "GUID2",
                                                '2', 1, "Joypad2RealName",
                                                basicInputs1)
basicController3 = controllersConfig.Controller("contr3", "joypad", "GUID3",
                                                '3', 2, "Joypad3RealName",
                                                basicInputs1)
basicController4 = controllersConfig.Controller("contr4", "joypad", "GUID4",
                                                '4', 3, "Joypad4RealName",
                                                basicInputs1)
controllers4 = {
    "1": basicController1,
    "2": basicController2,
    "3": basicController3,
    "4": basicController4
Ejemplo n.º 5
0
 def test_padtype_psx(self):
     basicController = controllersConfig.Controller("contr1", "joypad",
                                                    "GUID1", '1', "0",
                                                    "Joypad1RealName",
                                                    axisAndBtnsInputs)
     padtype = libretroControllers.getAnalogMode(basicController, psx)
                     smooth='2',
                     emulator='fba2x')

fbaSystemCustom = Emulator(name='fba',
                           videomode='6',
                           shaders='',
                           ratio='auto',
                           smooth='2',
                           emulator='fba2x',
                           configfile='lol')
# test inputs
basicInputs1 = {
    'hotkey': controllersConfig.Input("hotkey", "button", "10", "1", "0")
}
basicController1 = controllersConfig.Controller("contr1", "joypad", "GUID1",
                                                "0", "Joypad1RealName",
                                                basicInputs1)

rom = "MyRom.zip"

# Injecting test files
fba2xGenerator.rhgamestationFiles.fbaCustom = FBA2X_CUSTOM_CFG_FILE
fba2xGenerator.rhgamestationFiles.fbaCustomOrigin = FBA2X_ORIGIN_CFG_FILE
fba2xGenerator.fba2xConfig.fbaSettings = unixSettings.UnixSettings(
    FBA2X_CUSTOM_CFG_FILE)
fba2xGenerator.fba2xControllers.fbaSettings = unixSettings.UnixSettings(
    FBA2X_CUSTOM_CFG_FILE)

fba2xGen = Fba2xGenerator()