@@ -810,8 +810,8 @@ input_item_id PAD_DIR[4][4]=
810810 {ITEM_ID_8_PAD ,ITEM_ID_2_PAD ,ITEM_ID_4_PAD ,ITEM_ID_6_PAD }
811811};
812812
813- // Default : A ->B1 | B ->B2 | X ->B3 | Y ->B4 | L ->B5 | R ->B6
814- int Buttons_mapping [6 ]= {RETROPAD_A ,RETROPAD_B ,RETROPAD_X ,RETROPAD_Y ,RETROPAD_L ,RETROPAD_R };
813+ // Default : A ->B1 | B ->B2 | X ->B3 | Y ->B4 | L ->B5 | R ->B6 | keyboard c ->B7 | keyboard v -> B8
814+ int Buttons_mapping [8 ]= {RETROPAD_A ,RETROPAD_B ,RETROPAD_X ,RETROPAD_Y ,RETROPAD_L ,RETROPAD_R , RETROK_c , RETROK_v };
815815
816816static void Input_Binding (running_machine & machine );
817817
@@ -989,6 +989,16 @@ static void initInput(running_machine &machine)
989989 & joystate [i ].button [Buttons_mapping [4 ]],(input_item_id )(ITEM_ID_BUTTON1 + 4 ),generic_button_get_state );
990990 input_device_item_add_joy (i ,Buttons_Name [Buttons_mapping [5 ]],\
991991 & joystate [i ].button [Buttons_mapping [5 ]],(input_item_id )(ITEM_ID_BUTTON1 + 5 ),generic_button_get_state );
992+ if (Buttons_mapping [6 ]!= RETROK_c )
993+ {
994+ input_device_item_add_joy (i ,Buttons_Name [Buttons_mapping [6 ]],\
995+ & joystate [i ].button [Buttons_mapping [6 ]],(input_item_id )(ITEM_ID_BUTTON1 + 6 ),generic_button_get_state );
996+ }
997+ if (Buttons_mapping [7 ]!= RETROK_v )
998+ {
999+ input_device_item_add_joy (i ,Buttons_Name [Buttons_mapping [7 ]],\
1000+ & joystate [i ].button [Buttons_mapping [7 ]],(input_item_id )(ITEM_ID_BUTTON1 + 7 ),generic_button_get_state );
1001+ }
9921002
9931003 sprintf (defname , "Pad%d" , i );
9941004 Pad_device [i ] = machine .input ().device_class (DEVICE_CLASS_KEYBOARD ).add_device (defname );
@@ -1370,6 +1380,22 @@ static void Input_Binding(running_machine &machine)
13701380 Buttons_mapping [4 ]= RETROPAD_L ;
13711381 Buttons_mapping [5 ]= RETROPAD_X ;
13721382 }
1383+ else if (
1384+ (core_stricmp (machine .system ().name , "vr" ) == 0 ) ||
1385+ (core_stricmp (machine .system ().parent , "vr" ) == 0 )
1386+ )
1387+ {
1388+ /* Virtua Racing */
1389+
1390+ Buttons_mapping [0 ]= RETROPAD_A ;
1391+ Buttons_mapping [1 ]= RETROPAD_B ;
1392+ Buttons_mapping [2 ]= RETROPAD_X ;
1393+ Buttons_mapping [3 ]= RETROPAD_Y ;
1394+ Buttons_mapping [4 ]= RETROPAD_PAD_DOWN ;
1395+ Buttons_mapping [5 ]= RETROPAD_PAD_UP ;
1396+ Buttons_mapping [6 ]= RETROPAD_L ;
1397+ Buttons_mapping [7 ]= RETROPAD_R ;
1398+ }
13731399
13741400}
13751401
0 commit comments