mirror of https://github.com/stella-emu/stella.git
made joystick default controller for libretro.cxx
fixed libretro VS project
This commit is contained in:
parent
9f13401d0d
commit
2d57f9e028
|
@ -14,7 +14,7 @@
|
||||||
<ProjectGuid>{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}</ProjectGuid>
|
<ProjectGuid>{D7FCEC7F-33E1-49DD-A4B0-D5FC222250AD}</ProjectGuid>
|
||||||
<RootNamespace>stella_libretro</RootNamespace>
|
<RootNamespace>stella_libretro</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<XPDeprecationWarning>false</XPDeprecationWarning>
|
<XPDeprecationWarning>false</XPDeprecationWarning>
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<DebugInformationFormat>None</DebugInformationFormat>
|
<DebugInformationFormat>None</DebugInformationFormat>
|
||||||
<ObjectFileName>$(IntDir)obj\libretro\%(RelativeDir)</ObjectFileName>
|
<ObjectFileName>$(IntDir)obj\libretro\%(RelativeDir)</ObjectFileName>
|
||||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<CompileAs>CompileAsCpp</CompileAs>
|
<CompileAs>CompileAsCpp</CompileAs>
|
||||||
|
@ -137,6 +137,7 @@
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\common\Bezel.cxx" />
|
||||||
<ClCompile Include="..\..\common\JoyMap.cxx" />
|
<ClCompile Include="..\..\common\JoyMap.cxx" />
|
||||||
<ClCompile Include="..\..\common\KeyMap.cxx" />
|
<ClCompile Include="..\..\common\KeyMap.cxx" />
|
||||||
<ClCompile Include="..\..\common\Logger.cxx" />
|
<ClCompile Include="..\..\common\Logger.cxx" />
|
||||||
|
@ -279,6 +280,7 @@
|
||||||
<ClInclude Include="..\..\common\AudioQueue.hxx" />
|
<ClInclude Include="..\..\common\AudioQueue.hxx" />
|
||||||
<ClInclude Include="..\..\common\AudioSettings.hxx" />
|
<ClInclude Include="..\..\common\AudioSettings.hxx" />
|
||||||
<ClInclude Include="..\..\common\Base.hxx" />
|
<ClInclude Include="..\..\common\Base.hxx" />
|
||||||
|
<ClInclude Include="..\..\common\Bezel.hxx" />
|
||||||
<ClInclude Include="..\..\common\bspf.hxx" />
|
<ClInclude Include="..\..\common\bspf.hxx" />
|
||||||
<ClInclude Include="..\..\common\FpsMeter.hxx" />
|
<ClInclude Include="..\..\common\FpsMeter.hxx" />
|
||||||
<ClInclude Include="..\..\common\FSNodeFactory.hxx" />
|
<ClInclude Include="..\..\common\FSNodeFactory.hxx" />
|
||||||
|
|
|
@ -80,21 +80,6 @@ static void update_input()
|
||||||
GET_BITMASK(pad)
|
GET_BITMASK(pad)
|
||||||
switch(input_type[0])
|
switch(input_type[0])
|
||||||
{
|
{
|
||||||
case Controller::Type::Joy2BPlus:
|
|
||||||
case Controller::Type::BoosterGrip:
|
|
||||||
MASK_EVENT(Event::LeftJoystickFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
|
|
||||||
[[fallthrough]];
|
|
||||||
case Controller::Type::Genesis:
|
|
||||||
MASK_EVENT(Event::LeftJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
|
|
||||||
[[fallthrough]];
|
|
||||||
case Controller::Type::Joystick:
|
|
||||||
MASK_EVENT(Event::LeftJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
|
||||||
MASK_EVENT(Event::LeftJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
|
||||||
MASK_EVENT(Event::LeftJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
|
|
||||||
MASK_EVENT(Event::LeftJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
|
|
||||||
MASK_EVENT(Event::LeftJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Controller::Type::Driving:
|
case Controller::Type::Driving:
|
||||||
MASK_EVENT(Event::LeftDrivingCCW, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
MASK_EVENT(Event::LeftDrivingCCW, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
||||||
MASK_EVENT(Event::LeftDrivingCW, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
MASK_EVENT(Event::LeftDrivingCW, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
||||||
|
@ -129,7 +114,20 @@ static void update_input()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case Controller::Type::Joy2BPlus:
|
||||||
|
case Controller::Type::BoosterGrip:
|
||||||
|
MASK_EVENT(Event::LeftJoystickFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
|
||||||
|
[[fallthrough]];
|
||||||
|
case Controller::Type::Genesis:
|
||||||
|
MASK_EVENT(Event::LeftJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
|
||||||
|
[[fallthrough]];
|
||||||
|
case Controller::Type::Joystick:
|
||||||
default:
|
default:
|
||||||
|
MASK_EVENT(Event::LeftJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
||||||
|
MASK_EVENT(Event::LeftJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
||||||
|
MASK_EVENT(Event::LeftJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
|
||||||
|
MASK_EVENT(Event::LeftJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
|
||||||
|
MASK_EVENT(Event::LeftJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pad++;
|
pad++;
|
||||||
|
@ -137,21 +135,6 @@ static void update_input()
|
||||||
|
|
||||||
switch(input_type[1])
|
switch(input_type[1])
|
||||||
{
|
{
|
||||||
case Controller::Type::Joy2BPlus:
|
|
||||||
case Controller::Type::BoosterGrip:
|
|
||||||
MASK_EVENT(Event::RightJoystickFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
|
|
||||||
[[fallthrough]];
|
|
||||||
case Controller::Type::Genesis:
|
|
||||||
MASK_EVENT(Event::RightJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
|
|
||||||
[[fallthrough]];
|
|
||||||
case Controller::Type::Joystick:
|
|
||||||
MASK_EVENT(Event::RightJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
|
||||||
MASK_EVENT(Event::RightJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
|
||||||
MASK_EVENT(Event::RightJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
|
|
||||||
MASK_EVENT(Event::RightJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
|
|
||||||
MASK_EVENT(Event::RightJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Controller::Type::Driving:
|
case Controller::Type::Driving:
|
||||||
MASK_EVENT(Event::RightDrivingCCW, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
MASK_EVENT(Event::RightDrivingCCW, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
||||||
MASK_EVENT(Event::RightDrivingCW, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
MASK_EVENT(Event::RightDrivingCW, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
||||||
|
@ -172,7 +155,20 @@ static void update_input()
|
||||||
EVENT(Event::RightPaddleBAnalog, input_state_cb(pad, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X));
|
EVENT(Event::RightPaddleBAnalog, input_state_cb(pad, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Controller::Type::Joy2BPlus:
|
||||||
|
case Controller::Type::BoosterGrip:
|
||||||
|
MASK_EVENT(Event::RightJoystickFire9, pad, RETRO_DEVICE_ID_JOYPAD_Y);
|
||||||
|
[[fallthrough]];
|
||||||
|
case Controller::Type::Genesis:
|
||||||
|
MASK_EVENT(Event::RightJoystickFire5, pad, RETRO_DEVICE_ID_JOYPAD_A);
|
||||||
|
[[fallthrough]];
|
||||||
|
case Controller::Type::Joystick:
|
||||||
default:
|
default:
|
||||||
|
MASK_EVENT(Event::RightJoystickLeft, pad, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
||||||
|
MASK_EVENT(Event::RightJoystickRight, pad, RETRO_DEVICE_ID_JOYPAD_RIGHT);
|
||||||
|
MASK_EVENT(Event::RightJoystickUp, pad, RETRO_DEVICE_ID_JOYPAD_UP);
|
||||||
|
MASK_EVENT(Event::RightJoystickDown, pad, RETRO_DEVICE_ID_JOYPAD_DOWN);
|
||||||
|
MASK_EVENT(Event::RightJoystickFire, pad, RETRO_DEVICE_ID_JOYPAD_B);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue