def test_generate_specials(self):
     controllers = controllersConfig.loadControllerConfig(
         0, GPIOUUID, "p1controller", "", -1, 0, "p2controller", "", -1, 0,
         "p3controller", "", -1, 0, "p4controller", "")
     config = libretroControllers.generateControllerConfig(controllers["1"])
     print config
     self.assertEquals(config['input_exit_emulator_btn'], '7')
 def test_generate_specialsKeys_off_save_exit_special(self):
     controllers = controllersConfig.loadControllerConfig(
         0, PS3UUID, "p1controller", "", -1, 0, "p2controller", "", -1, 0,
         "p3controller", "", -1, 0, "p4controller", "")
     config = libretroControllers.generateControllerConfig(
         controllers["1"], True)
     self.assertEquals(config['input_exit_emulator_btn'], '3')
 def test_generate_joystick_as_directions(self):
     controllers = controllersConfig.loadControllerConfig(
         0, GPIOUUID, "p1controller", "", -1, 0, "p2controller", "", -1, 0,
         "p3controller", "", -1, 0, "p4controller", "")
     config = libretroControllers.generateControllerConfig(controllers["1"])
     self.assertEquals(config['input_player1_up_axis'], '-1')
     self.assertEquals(config['input_player1_down_axis'], '+1')
     self.assertEquals(config['input_player1_right_axis'], '+0')
     self.assertEquals(config['input_player1_left_axis'], '-0')
 def test_generate_ps3_controller_joysticks(self):
     controllers = controllersConfig.loadControllerConfig(
         0, PS3UUID, "p1controller", "", -1, 0, "p2controller", "", -1, 0,
         "p3controller", "", -1, 0, "p4controller", "")
     config = libretroControllers.generateControllerConfig(controllers["1"])
     self.assertEquals(config['input_player1_l_y_plus_axis'], '+1')
     self.assertEquals(config['input_player1_l_y_minus_axis'], '-1')
     self.assertEquals(config['input_player1_l_x_plus_axis'], '+0')
     self.assertEquals(config['input_player1_l_x_minus_axis'], '-0')
 def test_generate_with_recalbox_conf_es_menu_off_doesnt_save_hotkeys(self):
     controllers = controllersConfig.loadControllerConfig(
         0, PS3UUID, "p1controller", "", -1, 0, "p2controller", "", -1, 0,
         "p3controller", "", -1, 0, "p4controller", "")
     config = libretroControllers.generateControllerConfig(
         controllers["1"], True)
     self.assertFalse('input_load_state_btn' in config)
     self.assertFalse('input_menu_toggle_btn' in config)
     self.assertFalse('input_state_slot_increase_axis' in config)
Beispiel #6
0
 def test_generate_ps3_controller_joysticks_right(self):
     controllers = controllersConfig.loadControllerConfig(
         0, PS3UUID, "p1controller", "", "0", -1, 0, "p2controller", "",
         "0", -1, 0, "p3controller", "", "0", -1, 0, "p4controller", "",
         "0", -1, 0, "p5controller", "", "0")
     config = libretroControllers.generateControllerConfig(controllers["1"])
     self.assertEquals(config['input_player1_r_y_plus_axis'], '+3')
     self.assertEquals(config['input_player1_r_y_minus_axis'], '-3')
     self.assertEquals(config['input_player1_r_x_plus_axis'], '+2')
     self.assertEquals(config['input_player1_r_x_minus_axis'], '-2')
 def test_generate_ps3_controller_buttons(self):
     controllers = controllersConfig.loadControllerConfig(
         0, PS3UUID, "p1controller", "", -1, 0, "p2controller", "", -1, 0,
         "p3controller", "", -1, 0, "p4controller", "")
     config = libretroControllers.generateControllerConfig(controllers["1"])
     self.assertEquals(config['input_player1_select_btn'], '0')
     self.assertEquals(config['input_player1_a_btn'], '13')
     self.assertEquals(config['input_player1_start_btn'], '3')
     self.assertEquals(config['input_player1_b_btn'], '14')
     self.assertEquals(config['input_player1_l2_btn'], '8')
     self.assertEquals(config['input_player1_r_btn'], '11')
     self.assertEquals(config['input_player1_y_btn'], '15')
     self.assertEquals(config['input_player1_x_btn'], '12')
     self.assertEquals(config['input_player1_l_btn'], '10')
 def test_generate_simple_controller(self):
     config = libretroControllers.generateControllerConfig(basicController1)
     self.assertEquals(config['input_player1_a_btn'], '10')