mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Initial megacommit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
863
Source/Plugins/Plugin_PadSimple/Plugin_PadSimple.vcproj
Normal file
863
Source/Plugins/Plugin_PadSimple/Plugin_PadSimple.vcproj
Normal file
@ -0,0 +1,863 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="Plugin_PadSimple"
|
||||
ProjectGUID="{9A183B48-ECC2-4121-876A-9B3793686073}"
|
||||
RootNamespace="Plugin_PadSimple"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/Pad_Simple.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../PluginSpecs;../../Core/Common/Src"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PAD_SIMPLE_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
FloatingPointModel="2"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1053"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib"
|
||||
OutputFile="..\..\..\Binary\Win32/plugins\Plugin_PadSimple.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateManifest="false"
|
||||
ProgramDatabaseFile=".\Release/Pad_Simple.pdb"
|
||||
ImportLibrary=".\Release/Pad_Simple.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\Release/Pad_Simple.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../PluginSpecs;../../Core/Common/Src"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PAD_SIMPLE_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
FloatingPointModel="2"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1053"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib"
|
||||
OutputFile="..\..\..\Binary\x64\plugins\Plugin_PadSimple.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateManifest="false"
|
||||
ProgramDatabaseFile=".\Release/Pad_Simple.pdb"
|
||||
ImportLibrary=".\Release/Pad_Simple.lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/Pad_Simple.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../PluginSpecs;../../Core/Common/Src"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PAD_SIMPLE_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="4"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1053"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib"
|
||||
OutputFile="..\..\..\Binary\Win32/plugins\Plugin_PadSimpleD.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/Pad_Simple.pdb"
|
||||
ImportLibrary=".\Debug/Pad_Simple.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\Debug/Pad_Simple.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../PluginSpecs;../../Core/Common/Src"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PAD_SIMPLE_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1053"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib"
|
||||
OutputFile="..\..\..\Binary\x64\plugins\Plugin_PadSimpleD.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/Pad_Simple.pdb"
|
||||
ImportLibrary=".\Debug/Pad_Simple.lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugFast|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/Pad_Simple.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../PluginSpecs;../../Core/Common/Src"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PAD_SIMPLE_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
FloatingPointModel="2"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1053"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib"
|
||||
OutputFile="..\..\..\Binary\Win32/plugins\Plugin_PadSimple.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateManifest="false"
|
||||
ProgramDatabaseFile=".\Release/Pad_Simple.pdb"
|
||||
ImportLibrary=".\Release/Pad_Simple.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugFast|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="3"
|
||||
TypeLibraryName=".\Release/Pad_Simple.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="../../../Externals/WTL80;../../PluginSpecs;../../Core/Common/Src"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PAD_SIMPLE_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
FloatingPointModel="2"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1053"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="dxguid.lib dxerr9.lib dinput8.lib xinput.lib"
|
||||
OutputFile="..\..\..\Binary\x64\plugins\Plugin_PadSimple.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateManifest="false"
|
||||
ProgramDatabaseFile=".\Release/Pad_Simple.pdb"
|
||||
ImportLibrary=".\Release/Pad_Simple.lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="AboutDialog"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Src\AboutDlg.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\AboutDlg.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ConfigDialog"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Src\ConfigDlg.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\ConfigDlg.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="DirectInputBase"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Src\DirectInputBase.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\DirectInputBase.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Src\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\resource.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\Src\main.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\PluginSpecs\pluginspecs_pad.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;PAD_SIMPLE_EXPORTS;$(NoInherit)"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\stdafx.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
36
Source/Plugins/Plugin_PadSimple/Src/AboutDlg.cpp
Normal file
36
Source/Plugins/Plugin_PadSimple/Src/AboutDlg.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include "AboutDlg.h"
|
||||
|
||||
LRESULT CAboutDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
CenterWindow(GetParent());
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
LRESULT CAboutDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
EndDialog(wID);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
41
Source/Plugins/Plugin_PadSimple/Src/AboutDlg.h
Normal file
41
Source/Plugins/Plugin_PadSimple/Src/AboutDlg.h
Normal file
@ -0,0 +1,41 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#pragma once
|
||||
|
||||
class CAboutDlg
|
||||
: public CDialogImpl<CAboutDlg>
|
||||
{
|
||||
public:
|
||||
|
||||
enum { IDD = IDD_ABOUTPAD };
|
||||
|
||||
BEGIN_MSG_MAP(CAboutDlg)
|
||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||
COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
|
||||
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
|
||||
END_MSG_MAP()
|
||||
|
||||
// Handler prototypes (uncomment arguments if needed):
|
||||
// LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||
// LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
|
||||
|
||||
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
|
||||
|
||||
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
|
||||
};
|
187
Source/Plugins/Plugin_PadSimple/Src/ConfigDlg.cpp
Normal file
187
Source/Plugins/Plugin_PadSimple/Src/ConfigDlg.cpp
Normal file
@ -0,0 +1,187 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include <windowsx.h>
|
||||
#include "resource.h"
|
||||
|
||||
#include "DirectInputBase.h"
|
||||
#include "ConfigDlg.h"
|
||||
#define NUMCONTROLS 23
|
||||
int m_buttonResources[NUMCONTROLS] =
|
||||
{
|
||||
IDC_SETMAINLEFT,
|
||||
IDC_SETMAINUP,
|
||||
IDC_SETMAINRIGHT,
|
||||
IDC_SETMAINDOWN,
|
||||
IDC_SETSUBLEFT,
|
||||
IDC_SETSUBUP,
|
||||
IDC_SETSUBRIGHT,
|
||||
IDC_SETSUBDOWN,
|
||||
IDC_SETDPADLEFT,
|
||||
IDC_SETDPADUP,
|
||||
IDC_SETDPADRIGHT,
|
||||
IDC_SETDPADDOWN,
|
||||
IDC_SETA,
|
||||
IDC_SETB,
|
||||
IDC_SETX,
|
||||
IDC_SETY,
|
||||
IDC_SETZ,
|
||||
IDC_SETL,
|
||||
IDC_SETR,
|
||||
IDC_SETSTART,
|
||||
// CTL_HALFMAIN,
|
||||
// CTL_HALFSUB,
|
||||
// CTL_HALFTRIGGER,
|
||||
// NUMCONTROLS
|
||||
};
|
||||
|
||||
extern int keyForControl[NUMCONTROLS];
|
||||
extern bool g_rumbleEnable;
|
||||
|
||||
LRESULT CConfigDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
m_dinput.Init(m_hWnd);
|
||||
|
||||
CenterWindow(GetParent());
|
||||
|
||||
for (int i = 0; i < NUMCONTROLS - 3; i++)
|
||||
{
|
||||
CButton button = GetDlgItem(m_buttonResources[i]);
|
||||
SetButtonText(button, keyForControl[i]);
|
||||
}
|
||||
|
||||
m_hWaitForKeyButton = NULL;
|
||||
CheckDlgButton(IDC_RUMBLE1, g_rumbleEnable);
|
||||
SetTimer(1, 50, 0);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
LRESULT CConfigDlg::OnCommand(UINT /*uMsg*/, WPARAM _wParam, LPARAM _lParam, BOOL& _bHandled)
|
||||
{
|
||||
// we have not handled it
|
||||
_bHandled = FALSE;
|
||||
|
||||
// check if it is a key
|
||||
for (int i = 0; i < NUMCONTROLS; i++)
|
||||
{
|
||||
if (m_buttonResources[i] == LOWORD(_wParam))
|
||||
{
|
||||
m_iKeyWaitingFor = i;
|
||||
m_hWaitForKeyButton = GetDlgItem(m_buttonResources[i]);
|
||||
|
||||
CButton tmpButton = m_hWaitForKeyButton;
|
||||
tmpButton.SetWindowText("Press Key");
|
||||
|
||||
_bHandled = TRUE; // yeah we have handled it
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_rumbleEnable = Button_GetCheck(GetDlgItem(IDC_RUMBLE1)) ? true : false;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
LRESULT CConfigDlg::OnTimer(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
if (m_hWaitForKeyButton != NULL)
|
||||
{
|
||||
m_dinput.Read();
|
||||
|
||||
for (int i = 0; i < 255; i++)
|
||||
{
|
||||
if (m_dinput.diks[i])
|
||||
{
|
||||
keyForControl[m_iKeyWaitingFor] = i;
|
||||
CButton tmpButton = m_hWaitForKeyButton;
|
||||
SetButtonText(tmpButton, keyForControl[m_iKeyWaitingFor]);
|
||||
|
||||
m_hWaitForKeyButton = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
LRESULT CConfigDlg::OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
{
|
||||
m_dinput.Free();
|
||||
|
||||
EndDialog(wID);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
void CConfigDlg::SetButtonText(CButton& _rButton, int _key)
|
||||
{
|
||||
char szTemp[64];
|
||||
|
||||
switch (_key)
|
||||
{
|
||||
case DIK_LEFT:
|
||||
strcpy(szTemp, "Left");
|
||||
break;
|
||||
|
||||
case DIK_UP:
|
||||
strcpy(szTemp, "Up");
|
||||
break;
|
||||
|
||||
case DIK_RIGHT:
|
||||
strcpy(szTemp, "Right");
|
||||
break;
|
||||
|
||||
case DIK_DOWN:
|
||||
strcpy(szTemp, "Down");
|
||||
break;
|
||||
|
||||
case DIK_HOME:
|
||||
strcpy(szTemp, "Home");
|
||||
break;
|
||||
|
||||
case DIK_END:
|
||||
strcpy(szTemp, "End");
|
||||
break;
|
||||
|
||||
case DIK_INSERT:
|
||||
strcpy(szTemp, "Ins");
|
||||
break;
|
||||
|
||||
case DIK_DELETE:
|
||||
strcpy(szTemp, "Del");
|
||||
break;
|
||||
|
||||
case DIK_PGUP:
|
||||
strcpy(szTemp, "PgUp");
|
||||
break;
|
||||
|
||||
case DIK_PGDN:
|
||||
strcpy(szTemp, "PgDn");
|
||||
break;
|
||||
|
||||
default:
|
||||
GetKeyNameText(_key << 16, szTemp, 64);
|
||||
break;
|
||||
}
|
||||
|
||||
_rButton.SetWindowText(szTemp);
|
||||
}
|
||||
|
||||
|
50
Source/Plugins/Plugin_PadSimple/Src/ConfigDlg.h
Normal file
50
Source/Plugins/Plugin_PadSimple/Src/ConfigDlg.h
Normal file
@ -0,0 +1,50 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#pragma once
|
||||
|
||||
class CConfigDlg
|
||||
: public CDialogImpl<CConfigDlg>
|
||||
{
|
||||
public:
|
||||
|
||||
enum { IDD = IDD_PADCONFIG };
|
||||
|
||||
BEGIN_MSG_MAP(CConfigDlg)
|
||||
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
||||
MESSAGE_HANDLER(WM_COMMAND, OnCommand)
|
||||
MESSAGE_HANDLER(WM_TIMER, OnTimer)
|
||||
COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
|
||||
END_MSG_MAP()
|
||||
|
||||
private:
|
||||
|
||||
HWND m_hWaitForKeyButton;
|
||||
int m_iKeyWaitingFor;
|
||||
DInput m_dinput;
|
||||
|
||||
// Handler prototypes (uncomment arguments if needed):
|
||||
// LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
|
||||
// LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
|
||||
// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
|
||||
|
||||
LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
|
||||
LRESULT OnCommand(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
|
||||
LRESULT OnTimer(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL & /*bHandled*/);
|
||||
LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL & /*bHandled*/);
|
||||
void SetButtonText(CButton& _rButton, int _key);
|
||||
};
|
119
Source/Plugins/Plugin_PadSimple/Src/DirectInputBase.cpp
Normal file
119
Source/Plugins/Plugin_PadSimple/Src/DirectInputBase.cpp
Normal file
@ -0,0 +1,119 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DirectInputBase.h"
|
||||
|
||||
DInput::DInput()
|
||||
: g_pDI(NULL),
|
||||
g_pKeyboard(NULL)
|
||||
{}
|
||||
|
||||
|
||||
DInput::~DInput()
|
||||
{
|
||||
Free();
|
||||
}
|
||||
|
||||
|
||||
HRESULT DInput::Init(HWND hWnd)
|
||||
{
|
||||
HRESULT hr;
|
||||
DWORD dwCoopFlags;
|
||||
dwCoopFlags = DISCL_FOREGROUND | DISCL_NOWINKEY;
|
||||
|
||||
// Create a DInput object
|
||||
if (FAILED(hr = DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION,
|
||||
IID_IDirectInput8, (VOID* *)&g_pDI, NULL)))
|
||||
{
|
||||
MessageBox(0, "Direct Input Create Failed", 0, MB_ICONERROR);
|
||||
return(hr);
|
||||
}
|
||||
|
||||
if (FAILED(hr = g_pDI->CreateDevice(GUID_SysKeyboard, &g_pKeyboard, NULL)))
|
||||
{
|
||||
MessageBox(0, "Couldn't access keyboard", 0, MB_ICONERROR);
|
||||
Free();
|
||||
return(hr);
|
||||
}
|
||||
|
||||
g_pKeyboard->SetDataFormat(&c_dfDIKeyboard);
|
||||
g_pKeyboard->SetCooperativeLevel(hWnd, dwCoopFlags);
|
||||
g_pKeyboard->Acquire();
|
||||
|
||||
return(S_OK);
|
||||
}
|
||||
|
||||
|
||||
void DInput::Free()
|
||||
{
|
||||
if (g_pKeyboard)
|
||||
{
|
||||
g_pKeyboard->Unacquire();
|
||||
g_pKeyboard->Release();
|
||||
g_pKeyboard = 0;
|
||||
}
|
||||
|
||||
if (g_pDI)
|
||||
{
|
||||
g_pDI->Release();
|
||||
g_pDI = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Desc: Read the input device's state when in immediate mode and display it.
|
||||
HRESULT DInput::Read()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
if (NULL == g_pKeyboard)
|
||||
{
|
||||
return(S_OK);
|
||||
}
|
||||
|
||||
// Get the input's device state, and put the state in dims
|
||||
ZeroMemory(diks, sizeof(diks));
|
||||
hr = g_pKeyboard->GetDeviceState(sizeof(diks), diks);
|
||||
|
||||
//for (int i=0; i<256; i++)
|
||||
// if (diks[i])MessageBox(0,"DSFJDKSF|",0,0);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
// DirectInput may be telling us that the input stream has been
|
||||
// interrupted. We aren't tracking any state between polls, so
|
||||
// we don't have any special reset that needs to be done.
|
||||
// We just re-acquire and try again.
|
||||
|
||||
// If input is lost then acquire and keep trying
|
||||
hr = g_pKeyboard->Acquire();
|
||||
|
||||
while (hr == DIERR_INPUTLOST)
|
||||
{
|
||||
hr = g_pKeyboard->Acquire();
|
||||
}
|
||||
|
||||
// hr may be DIERR_OTHERAPPHASPRIO or other errors. This
|
||||
// may occur when the app is minimized or in the process of
|
||||
// switching, so just try again later
|
||||
return(S_OK);
|
||||
}
|
||||
|
||||
return(S_OK);
|
||||
}
|
||||
|
||||
|
42
Source/Plugins/Plugin_PadSimple/Src/DirectInputBase.h
Normal file
42
Source/Plugins/Plugin_PadSimple/Src/DirectInputBase.h
Normal file
@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _DIRECTINPUTBASE_H
|
||||
#define _DIRECTINPUTBASE_H
|
||||
|
||||
class DInput
|
||||
{
|
||||
public:
|
||||
|
||||
DInput();
|
||||
~DInput();
|
||||
|
||||
HRESULT Init(HWND hWnd);
|
||||
void Free();
|
||||
HRESULT Read();
|
||||
|
||||
|
||||
BYTE diks[256]; // DirectInput keyboard state buffer
|
||||
|
||||
private:
|
||||
|
||||
LPDIRECTINPUT8 g_pDI; // The DirectInput object
|
||||
LPDIRECTINPUTDEVICE8 g_pKeyboard; // The keyboard device
|
||||
};
|
||||
|
||||
#endif
|
||||
|
5
Source/Plugins/Plugin_PadSimple/Src/SConscript
Normal file
5
Source/Plugins/Plugin_PadSimple/Src/SConscript
Normal file
@ -0,0 +1,5 @@
|
||||
Import('env')
|
||||
output = "../../../../Binary/linux/Plugins/padsimple.so"
|
||||
files = ["main.cpp",
|
||||
]
|
||||
env.SharedLibrary(output, files, LIBS=["common"])
|
640
Source/Plugins/Plugin_PadSimple/Src/main.cpp
Normal file
640
Source/Plugins/Plugin_PadSimple/Src/main.cpp
Normal file
@ -0,0 +1,640 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifdef _WIN32
|
||||
#define XINPUT_ENABLE
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#ifdef XINPUT_ENABLE
|
||||
#include "XInput.h"
|
||||
#endif
|
||||
|
||||
#include "pluginspecs_pad.h"
|
||||
|
||||
#include "IniFile.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include "DirectInputBase.h"
|
||||
#include "resource.h"
|
||||
#include "AboutDlg.h"
|
||||
#include "ConfigDlg.h"
|
||||
|
||||
DInput dinput;
|
||||
|
||||
#else
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
Display* GXdsp;
|
||||
#endif
|
||||
|
||||
// controls
|
||||
enum
|
||||
{
|
||||
CTL_MAINLEFT = 0,
|
||||
CTL_MAINUP,
|
||||
CTL_MAINRIGHT,
|
||||
CTL_MAINDOWN,
|
||||
CTL_SUBLEFT,
|
||||
CTL_SUBUP,
|
||||
CTL_SUBRIGHT,
|
||||
CTL_SUBDOWN,
|
||||
CTL_DPADLEFT,
|
||||
CTL_DPADUP,
|
||||
CTL_DPADRIGHT,
|
||||
CTL_DPADDOWN,
|
||||
CTL_A,
|
||||
CTL_B,
|
||||
CTL_X,
|
||||
CTL_Y,
|
||||
CTL_Z,
|
||||
CTL_L,
|
||||
CTL_R,
|
||||
CTL_START,
|
||||
CTL_HALFMAIN,
|
||||
CTL_HALFSUB,
|
||||
CTL_HALFTRIGGER,
|
||||
NUMCONTROLS
|
||||
};
|
||||
|
||||
// control names
|
||||
static const char* controlNames[] =
|
||||
{
|
||||
"Main_stick_left",
|
||||
"Main_stick_up",
|
||||
"Main_stick_right",
|
||||
"Main_stick_down",
|
||||
"Sub_stick_left",
|
||||
"Sub_stick_up",
|
||||
"Sub_stick_right",
|
||||
"Sub_stick_down",
|
||||
"D-Pad_left",
|
||||
"D-Pad_up",
|
||||
"D-Pad_right",
|
||||
"D-Pad_down",
|
||||
"A_button",
|
||||
"B_button",
|
||||
"X_button",
|
||||
"Y_button",
|
||||
"Z_trigger",
|
||||
"L_button",
|
||||
"R_button",
|
||||
"Start",
|
||||
"Soft_main_switch",
|
||||
"Soft_sub_switch",
|
||||
"Soft_triggers_switch",
|
||||
};
|
||||
|
||||
int keyForControl[NUMCONTROLS];
|
||||
|
||||
HINSTANCE g_hInstance = NULL;
|
||||
SPADInitialize g_PADInitialize;
|
||||
bool g_rumbleEnable = true;
|
||||
|
||||
void LoadConfig();
|
||||
void SaveConfig();
|
||||
|
||||
|
||||
#define RECORD_SIZE (1024 * 128)
|
||||
SPADStatus recordBuffer[RECORD_SIZE];
|
||||
int count = 0;
|
||||
|
||||
|
||||
// #define RECORD_STORE
|
||||
// #define RECORD_REPLAY
|
||||
|
||||
|
||||
void RecordInput(const SPADStatus& _rPADStatus)
|
||||
{
|
||||
if (count >= RECORD_SIZE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
recordBuffer[count++] = _rPADStatus;
|
||||
}
|
||||
|
||||
|
||||
const SPADStatus& PlayRecord()
|
||||
{
|
||||
if (count >= RECORD_SIZE){return(recordBuffer[0]);}
|
||||
|
||||
return(recordBuffer[count++]);
|
||||
}
|
||||
|
||||
|
||||
void LoadRecord()
|
||||
{
|
||||
FILE* pStream = fopen("c:\\pad-record.bin", "rb");
|
||||
|
||||
if (pStream != NULL)
|
||||
{
|
||||
fread(recordBuffer, 1, RECORD_SIZE * sizeof(SPADStatus), pStream);
|
||||
fclose(pStream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SaveRecord()
|
||||
{
|
||||
FILE* pStream = fopen("c:\\pad-record.bin", "wb");
|
||||
|
||||
if (pStream != NULL)
|
||||
{
|
||||
fwrite(recordBuffer, 1, RECORD_SIZE * sizeof(SPADStatus), pStream);
|
||||
fclose(pStream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||
DWORD dwReason, // reason called
|
||||
LPVOID lpvReserved) // reserved
|
||||
{
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hinstDLL;
|
||||
return(TRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
{
|
||||
_PluginInfo->Version = 0x0100;
|
||||
_PluginInfo->Type = PLUGIN_TYPE_PAD;
|
||||
|
||||
#ifndef _DEBUG
|
||||
strcpy(_PluginInfo->Name, "Dolphin KB/X360pad");
|
||||
#else
|
||||
strcpy(_PluginInfo->Name, "Dolphin KB/X360pad (Debug)");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void DllAbout(HWND _hParent)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
CAboutDlg aboutDlg;
|
||||
aboutDlg.DoModal(_hParent);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void DllConfig(HWND _hParent)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
LoadConfig();
|
||||
|
||||
CConfigDlg configDlg;
|
||||
configDlg.DoModal(_hParent);
|
||||
|
||||
SaveConfig();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void PAD_Initialize(SPADInitialize _PADInitialize)
|
||||
{
|
||||
#ifdef RECORD_REPLAY
|
||||
LoadRecord();
|
||||
#endif
|
||||
|
||||
g_PADInitialize = _PADInitialize;
|
||||
#ifdef _WIN32
|
||||
dinput.Init((HWND)g_PADInitialize.hWnd);
|
||||
#else
|
||||
GXdsp = (Display*)g_PADInitialize.hWnd;
|
||||
#endif
|
||||
|
||||
LoadConfig();
|
||||
}
|
||||
|
||||
|
||||
void PAD_Shutdown()
|
||||
{
|
||||
#ifdef RECORD_STORE
|
||||
SaveRecord();
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
dinput.Free();
|
||||
#endif
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
|
||||
const float kDeadZone = 0.1f;
|
||||
|
||||
// Implement circular deadzone
|
||||
void ScaleStickValues(unsigned char* outx,
|
||||
unsigned char* outy,
|
||||
short inx, short iny)
|
||||
{
|
||||
float x = ((float)inx + 0.5f) / 32767.5f;
|
||||
float y = ((float)iny + 0.5f) / 32767.5f;
|
||||
|
||||
if ((x == 0.0f) && (y == 0.0f)) // to be safe
|
||||
{
|
||||
*outx = 0;
|
||||
*outy = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
float magnitude = sqrtf(x * x + y * y);
|
||||
float nx = x / magnitude;
|
||||
float ny = y / magnitude;
|
||||
|
||||
if (magnitude < kDeadZone){magnitude = kDeadZone;}
|
||||
|
||||
magnitude = (magnitude - kDeadZone) / (1.0f - kDeadZone);
|
||||
magnitude *= magnitude; // another power may be more appropriate
|
||||
nx *= magnitude;
|
||||
ny *= magnitude;
|
||||
int ix = (int)(nx * 100);
|
||||
int iy = (int)(ny * 100);
|
||||
*outx = 0x80 + ix;
|
||||
*outy = 0x80 + iy;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
void DInput_Read(int _numPad, SPADStatus* _pPADStatus)
|
||||
{
|
||||
if (_numPad != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dinput.Read();
|
||||
|
||||
int mainvalue = (dinput.diks[keyForControl[CTL_HALFMAIN]] & 0xFF) ? 40 : 100;
|
||||
int subvalue = (dinput.diks[keyForControl[CTL_HALFSUB]] & 0xFF) ? 40 : 100;
|
||||
int triggervalue = (dinput.diks[keyForControl[CTL_HALFTRIGGER]] & 0xFF) ? 100 : 255;
|
||||
|
||||
// get the new keys
|
||||
if (dinput.diks[keyForControl[CTL_MAINLEFT]] & 0xFF){_pPADStatus->stickX -= mainvalue;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_MAINRIGHT]] & 0xFF){_pPADStatus->stickX += mainvalue;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_MAINDOWN]] & 0xFF){_pPADStatus->stickY -= mainvalue;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_MAINUP]] & 0xFF){_pPADStatus->stickY += mainvalue;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_SUBLEFT]] & 0xFF){_pPADStatus->substickX -= subvalue;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_SUBRIGHT]] & 0xFF){_pPADStatus->substickX += subvalue;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_SUBDOWN]] & 0xFF){_pPADStatus->substickY -= subvalue;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_SUBUP]] & 0xFF){_pPADStatus->substickY += subvalue;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_L]] & 0xFF)
|
||||
{
|
||||
_pPADStatus->button |= PAD_TRIGGER_L;
|
||||
_pPADStatus->triggerLeft = triggervalue;
|
||||
}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_R]] & 0xFF)
|
||||
{
|
||||
_pPADStatus->button |= PAD_TRIGGER_R;
|
||||
_pPADStatus->triggerRight = triggervalue;
|
||||
}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_A]] & 0xFF)
|
||||
{
|
||||
_pPADStatus->button |= PAD_BUTTON_A;
|
||||
_pPADStatus->analogA = 255;
|
||||
}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_B]] & 0xFF)
|
||||
{
|
||||
_pPADStatus->button |= PAD_BUTTON_B;
|
||||
_pPADStatus->analogB = 255;
|
||||
}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_X]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_X;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_Y]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_Y;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_Z]] & 0xFF){_pPADStatus->button |= PAD_TRIGGER_Z;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_DPADUP]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_UP;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_DPADDOWN]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_DOWN;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_DPADLEFT]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_LEFT;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_DPADRIGHT]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_RIGHT;}
|
||||
|
||||
if (dinput.diks[keyForControl[CTL_START]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_START;}
|
||||
}
|
||||
|
||||
|
||||
void XInput_Read(int _numPAD, SPADStatus* _pPADStatus)
|
||||
{
|
||||
#ifdef XINPUT_ENABLE
|
||||
const int base = 0x80;
|
||||
XINPUT_STATE xstate;
|
||||
DWORD xresult = XInputGetState(_numPAD, &xstate);
|
||||
|
||||
if ((xresult != ERROR_SUCCESS) && (_numPAD != 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// In addition, let's .. yes, let's use XINPUT!
|
||||
if (xresult == ERROR_SUCCESS)
|
||||
{
|
||||
const XINPUT_GAMEPAD& pad = xstate.Gamepad;
|
||||
|
||||
if ((_pPADStatus->stickX == base) && (_pPADStatus->stickY == base))
|
||||
{
|
||||
ScaleStickValues(
|
||||
&_pPADStatus->stickX,
|
||||
&_pPADStatus->stickY,
|
||||
pad.sThumbLX,
|
||||
pad.sThumbLY);
|
||||
}
|
||||
|
||||
if ((_pPADStatus->substickX == base) && (_pPADStatus->substickY == base))
|
||||
{
|
||||
ScaleStickValues(
|
||||
&_pPADStatus->substickX,
|
||||
&_pPADStatus->substickY,
|
||||
pad.sThumbRX,
|
||||
pad.sThumbRY);
|
||||
}
|
||||
|
||||
_pPADStatus->triggerLeft = pad.bLeftTrigger;
|
||||
_pPADStatus->triggerRight = pad.bRightTrigger;
|
||||
|
||||
if (pad.bLeftTrigger > 20){_pPADStatus->button |= PAD_TRIGGER_L;}
|
||||
|
||||
if (pad.bRightTrigger > 20){_pPADStatus->button |= PAD_TRIGGER_R;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_A){_pPADStatus->button |= PAD_BUTTON_A;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_X){_pPADStatus->button |= PAD_BUTTON_B;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_B){_pPADStatus->button |= PAD_BUTTON_X;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_Y){_pPADStatus->button |= PAD_BUTTON_Y;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_RIGHT_SHOULDER){_pPADStatus->button |= PAD_TRIGGER_Z;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_START){_pPADStatus->button |= PAD_BUTTON_START;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_DPAD_LEFT){_pPADStatus->button |= PAD_BUTTON_LEFT;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT){_pPADStatus->button |= PAD_BUTTON_RIGHT;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_DPAD_UP){_pPADStatus->button |= PAD_BUTTON_UP;}
|
||||
|
||||
if (pad.wButtons & XINPUT_GAMEPAD_DPAD_DOWN){_pPADStatus->button |= PAD_BUTTON_DOWN;}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
// The graphics plugin in the PCSX2 design leaves a lot of the window processing to the pad plugin, weirdly enough.
|
||||
void X11_Read(int _numPAD, SPADStatus* _pPADStatus)
|
||||
{
|
||||
// Do all the stuff we need to do once per frame here
|
||||
if (_numPAD != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// This code is from Zerofrog's pcsx2 pad plugin
|
||||
XEvent E;
|
||||
//int keyPress=0, keyRelease=0;
|
||||
KeySym key;
|
||||
|
||||
// keyboard input
|
||||
while (XPending(GXdsp) > 0)
|
||||
{
|
||||
XNextEvent(GXdsp, &E);
|
||||
|
||||
switch (E.type)
|
||||
{
|
||||
case KeyPress:
|
||||
//_KeyPress(pad, XLookupKeysym((XKeyEvent *)&E, 0)); break;
|
||||
key = XLookupKeysym((XKeyEvent*)&E, 0);
|
||||
/*
|
||||
for (i = 0; i < PADKEYS; i++) {
|
||||
if (key == conf.keys[pad][i]) {
|
||||
keyPress |= (1<<i);
|
||||
keyRelease&=~(1<<i);
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
|
||||
case KeyRelease:
|
||||
key = XLookupKeysym((XKeyEvent*)&E, 0);
|
||||
/*
|
||||
//_KeyRelease(pad, XLookupKeysym((XKeyEvent *)&E, 0));
|
||||
for (i=0; i<PADKEYS; i++) {
|
||||
if (key == conf.keys[pad][i]) {
|
||||
keyPress&=~(1<<i);
|
||||
keyRelease|= (1<<i);
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
|
||||
case FocusIn:
|
||||
XAutoRepeatOff(GXdsp);
|
||||
break;
|
||||
|
||||
case FocusOut:
|
||||
XAutoRepeatOn(GXdsp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
void PAD_GetStatus(BYTE _numPAD, SPADStatus* _pPADStatus)
|
||||
{
|
||||
// check if all is okay
|
||||
if ((_pPADStatus == NULL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef RECORD_REPLAY
|
||||
*_pPADStatus = PlayRecord();
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
const int base = 0x80;
|
||||
// clear pad
|
||||
memset(_pPADStatus, 0, sizeof(SPADStatus));
|
||||
|
||||
_pPADStatus->stickY = base;
|
||||
_pPADStatus->stickX = base;
|
||||
_pPADStatus->substickX = base;
|
||||
_pPADStatus->substickY = base;
|
||||
_pPADStatus->button |= PAD_USE_ORIGIN;
|
||||
#ifdef _WIN32
|
||||
// just update pad on focus
|
||||
//if (g_PADInitialize.hWnd != ::GetForegroundWindow())
|
||||
// return;
|
||||
#endif
|
||||
_pPADStatus->err = PAD_ERR_NONE;
|
||||
|
||||
// keyboard is hardwired to player 1.
|
||||
#ifdef _WIN32
|
||||
DInput_Read(_numPAD, _pPADStatus);
|
||||
XInput_Read(_numPAD, _pPADStatus);
|
||||
#else
|
||||
X11_Read(_numPAD, _pPADStatus);
|
||||
#endif
|
||||
|
||||
#ifdef RECORD_STORE
|
||||
RecordInput(*_pPADStatus);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Rough approximation of GC behaviour - needs improvement.
|
||||
void PAD_Rumble(BYTE _numPAD, unsigned int _uType, unsigned int _uStrength)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
static int a = 0;
|
||||
|
||||
if ((_uType == 0) || (_uType == 2))
|
||||
{
|
||||
a = 0;
|
||||
}
|
||||
else if (_uType == 1)
|
||||
{
|
||||
a = _uStrength > 2 ? 8000 : 0;
|
||||
}
|
||||
|
||||
a = int ((float)a * 0.96f);
|
||||
|
||||
if (!g_rumbleEnable)
|
||||
{
|
||||
a = 0;
|
||||
}
|
||||
|
||||
#ifdef XINPUT_ENABLE
|
||||
XINPUT_VIBRATION vib;
|
||||
vib.wLeftMotorSpeed = a; //_uStrength*100;
|
||||
vib.wRightMotorSpeed = a; //_uStrength*100;
|
||||
XInputSetState(_numPAD, &vib);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
unsigned int SaveLoadState(char* _ptr, BOOL _bSave)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
void LoadConfig()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
// Initialize pad 1 to standard controls
|
||||
const int defaultKeyForControl[NUMCONTROLS] =
|
||||
{
|
||||
DIK_LEFT, //mainstick
|
||||
DIK_UP,
|
||||
DIK_RIGHT,
|
||||
DIK_DOWN,
|
||||
DIK_J, //substick
|
||||
DIK_I,
|
||||
DIK_L,
|
||||
DIK_K,
|
||||
DIK_F, //dpad
|
||||
DIK_T,
|
||||
DIK_H,
|
||||
DIK_G,
|
||||
DIK_X, //buttons
|
||||
DIK_Z,
|
||||
DIK_S,
|
||||
DIK_C,
|
||||
DIK_D,
|
||||
DIK_Q,
|
||||
DIK_W,
|
||||
DIK_RETURN,
|
||||
DIK_LSHIFT,
|
||||
DIK_LSHIFT,
|
||||
DIK_LCONTROL
|
||||
};
|
||||
#endif
|
||||
IniFile file;
|
||||
file.Load("pad.ini");
|
||||
|
||||
for (int i = 0; i < NUMCONTROLS; i++)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
file.Get("Bindings", controlNames[i], &keyForControl[i], defaultKeyForControl[i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
file.Get("XPad1", "Rumble", &g_rumbleEnable, true);
|
||||
}
|
||||
|
||||
|
||||
void SaveConfig()
|
||||
{
|
||||
IniFile file;
|
||||
file.Load("pad.ini");
|
||||
|
||||
for (int i = 0; i < NUMCONTROLS; i++)
|
||||
{
|
||||
file.Set("Bindings", controlNames[i], keyForControl[i]);
|
||||
}
|
||||
|
||||
file.Set("XPad1", "Rumble", g_rumbleEnable);
|
||||
file.Save("pad.ini");
|
||||
}
|
||||
|
||||
|
39
Source/Plugins/Plugin_PadSimple/Src/resource.h
Normal file
39
Source/Plugins/Plugin_PadSimple/Src/resource.h
Normal file
@ -0,0 +1,39 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by resource.rc
|
||||
//
|
||||
#define IDD_PADCONFIG 101
|
||||
#define IDD_ABOUTPAD 104
|
||||
#define IDC_SETSTART 1003
|
||||
#define IDC_SETA 1004
|
||||
#define IDC_SETB 1005
|
||||
#define IDC_SETX 1006
|
||||
#define IDC_SETY 1007
|
||||
#define IDC_SETZ 1008
|
||||
#define IDC_SETSUBUP 1009
|
||||
#define IDC_SETSUBLEFT 1010
|
||||
#define IDC_SETSUBRIGHT 1011
|
||||
#define IDC_SETSUBDOWN 1012
|
||||
#define IDC_SETDPADUP 1013
|
||||
#define IDC_SETDPADLEFT 1014
|
||||
#define IDC_SETDPADRIGHT 1015
|
||||
#define IDC_SETDPADDOWN 1016
|
||||
#define IDC_SETMAINUP 1017
|
||||
#define IDC_SETMAINLEFT 1018
|
||||
#define IDC_SETMAINDOWN 1019
|
||||
#define IDC_SETMAINRIGHT 1020
|
||||
#define IDC_SETL 1021
|
||||
#define IDC_SETR 1022
|
||||
#define IDC_RUMBLE 1023
|
||||
#define IDC_RUMBLE1 1023
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1024
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
137
Source/Plugins/Plugin_PadSimple/Src/resource.rc
Normal file
137
Source/Plugins/Plugin_PadSimple/Src/resource.rc
Normal file
@ -0,0 +1,137 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_PADCONFIG DIALOGEX 0, 0, 344, 236
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Pad configuration"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",IDOK,287,215,50,14
|
||||
PUSHBUTTON "start",IDC_SETSTART,147,103,40,14
|
||||
PUSHBUTTON "a",IDC_SETA,249,83,40,14
|
||||
PUSHBUTTON "b",IDC_SETB,221,99,40,14
|
||||
PUSHBUTTON "x",IDC_SETX,206,72,40,14
|
||||
PUSHBUTTON "y",IDC_SETY,292,90,40,14
|
||||
PUSHBUTTON "z",IDC_SETZ,247,36,40,14
|
||||
PUSHBUTTON " ",IDC_SETSUBUP,241,129,40,14
|
||||
PUSHBUTTON " ",IDC_SETSUBLEFT,199,148,40,14
|
||||
PUSHBUTTON " ",IDC_SETSUBRIGHT,281,147,40,14
|
||||
PUSHBUTTON " ",IDC_SETSUBDOWN,242,168,40,14
|
||||
PUSHBUTTON " ",IDC_SETDPADUP,72,130,40,14
|
||||
PUSHBUTTON " ",IDC_SETDPADLEFT,29,146,40,14
|
||||
PUSHBUTTON " ",IDC_SETDPADRIGHT,118,146,40,14
|
||||
PUSHBUTTON " ",IDC_SETDPADDOWN,73,167,40,14
|
||||
PUSHBUTTON " ",IDC_SETMAINUP,47,48,40,14
|
||||
PUSHBUTTON " ",IDC_SETMAINLEFT,13,67,40,14
|
||||
PUSHBUTTON " ",IDC_SETMAINDOWN,47,87,40,14
|
||||
PUSHBUTTON " ",IDC_SETMAINRIGHT,85,67,40,14
|
||||
PUSHBUTTON "l",IDC_SETL,97,17,40,14
|
||||
PUSHBUTTON "r",IDC_SETR,222,17,40,14
|
||||
GROUPBOX "Keyboard",IDC_STATIC,7,7,330,185
|
||||
GROUPBOX "XBox 360 Pad",IDC_STATIC,7,196,107,33
|
||||
CONTROL "Enable Rumble",IDC_RUMBLE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,210,76,10
|
||||
END
|
||||
|
||||
IDD_ABOUTPAD DIALOGEX 0, 0, 184, 76
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About Dolphin Simple Pad Plugin"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,127,55,50,14
|
||||
LTEXT "Coded by F|RES and ector",IDC_STATIC,7,30,104,14
|
||||
LTEXT "Keyboard and XInput simple pad plugin",IDC_STATIC,7,6,126,13
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_PADCONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 337
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 229
|
||||
END
|
||||
|
||||
IDD_ABOUTPAD, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 177
|
||||
TOPMARGIN, 6
|
||||
BOTTOMMARGIN, 69
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
18
Source/Plugins/Plugin_PadSimple/Src/stdafx.cpp
Normal file
18
Source/Plugins/Plugin_PadSimple/Src/stdafx.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "stdafx.h"
|
40
Source/Plugins/Plugin_PadSimple/Src/stdafx.h
Normal file
40
Source/Plugins/Plugin_PadSimple/Src/stdafx.h
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Insert your headers here
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <vector>
|
||||
#include <xstring>
|
||||
|
||||
// DInput
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
|
||||
// WTL
|
||||
#include <atlbase.h>
|
||||
#include <atlapp.h>
|
||||
#include <atldlgs.h>
|
||||
#include <atlctrls.h>
|
||||
|
||||
|
Reference in New Issue
Block a user