Added preliminary Wiimote plugin spec, and an empty test plugin.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@508 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
masken 2008-09-13 10:28:23 +00:00
parent 2ab88e167e
commit f6e4aad94f
15 changed files with 1159 additions and 253 deletions

View File

@ -57,6 +57,7 @@ dirs = [
#"Source/Plugins/Plugin_DSP_LLE/Src",
"Source/Plugins/Plugin_PadSimple/Src",
"Source/Plugins/Plugin_nJoy_SDL/Src",
"Source/Plugins/Plugin_Wiimote_Test/Src",
"Source/Core/DolphinWX/Src",
]

View File

@ -771,6 +771,14 @@
RelativePath=".\Src\Plugins\Plugin_Video.h"
>
</File>
<File
RelativePath=".\Src\Plugins\Plugin_Wiimote.cpp"
>
</File>
<File
RelativePath=".\Src\Plugins\Plugin_Wiimote.h"
>
</File>
<Filter
Name="Specs"
>
@ -790,6 +798,10 @@
RelativePath="..\..\PluginSpecs\pluginspecs_video.h"
>
</File>
<File
RelativePath="..\..\PluginSpecs\pluginspecs_wiimote.h"
>
</File>
</Filter>
</Filter>
<Filter

View File

@ -50,6 +50,7 @@
#include "Plugins/Plugin_Video.h"
#include "Plugins/Plugin_PAD.h"
#include "Plugins/Plugin_DSP.h"
#include "Plugins/Plugin_Wiimote.h"
#include "MemTools.h"
#include "Host.h"
@ -131,6 +132,10 @@ bool Init(const SCoreStartupParameter _CoreParameter)
PanicAlert("Failed to load video plugin %s", g_CoreStartupParameter.m_strVideoPlugin.c_str());
return false;
}
if (!PluginWiimote::LoadPlugin(g_CoreStartupParameter.m_strWiimotePlugin.c_str())) {
PanicAlert("Failed to load Wiimote plugin %s", g_CoreStartupParameter.m_strWiimotePlugin.c_str());
return false;
}
#ifdef _WIN32
if (PluginDSP::DllDebugger)
@ -368,6 +373,8 @@ THREAD_RETURN EmuThread(void *pArg)
PluginPAD::PAD_Shutdown();
PluginPAD::UnloadPlugin();
PluginWiimote::Wiimote_Shutdown();
PluginWiimote::UnloadPlugin();
PluginDSP::DSP_Shutdown();
PluginDSP::UnloadPlugin();
PluginVideo::Video_Shutdown();

View File

@ -30,15 +30,15 @@ struct SCoreStartupParameter
HINSTANCE hInstance;
#endif
// windows/GUI related
void* hMainWindow;
// windows/GUI related
void* hMainWindow;
// flags
bool bEnableDebugging;
bool bUseJIT;
bool bUseDualCore;
bool bNTSC;
bool bHLEBios;
bool bNTSC;
bool bHLEBios;
bool bUseFastMem;
bool bLockThreads;
bool bOptimizeQuantizers;
@ -56,27 +56,28 @@ struct SCoreStartupParameter
BOOT_BIOS_EUR,
};
enum EBootType
{
BOOT_ISO,
BOOT_ELF,
BOOT_BIN,
BOOT_DOL,
BOOT_BIOS
};
EBootType m_BootType;
enum EBootType
{
BOOT_ISO,
BOOT_ELF,
BOOT_BIN,
BOOT_DOL,
BOOT_BIOS
};
EBootType m_BootType;
// files
std::string m_strVideoPlugin;
std::string m_strPadPlugin;
std::string m_strDSPPlugin;
std::string m_strWiimotePlugin;
std::string m_strFilename;
std::string m_strFilename;
std::string m_strBios;
std::string m_strMemoryCardA;
std::string m_strMemoryCardB;
std::string m_strSRAM;
std::string m_strSRAM;
std::string m_strDefaultGCM;
std::string m_strUniqueID;

View File

@ -0,0 +1,89 @@
// 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 "DynamicLibrary.h"
#include "Plugin_Wiimote.h"
namespace PluginWiimote
{
// Function Pointer
TGetDllInfo GetDllInfo = 0;
TDllAbout DllAbout = 0;
TDllConfig DllConfig = 0;
TWiimote_Initialize Wiimote_Initialize = 0;
TWiimote_Shutdown Wiimote_Shutdown = 0;
TWiimote_Output Wiimote_Output = 0;
TWiimote_GetAttachedControllers Wiimote_GetAttachedControllers = 0;
TWiimote_DoState Wiimote_DoState = 0;
//! Library Instance
DynamicLibrary plugin;
bool IsLoaded()
{
return plugin.IsLoaded();
}
void UnloadPlugin()
{
plugin.Unload();
// Set Functions to NULL
GetDllInfo = 0;
DllAbout = 0;
DllConfig = 0;
Wiimote_Initialize = 0;
Wiimote_Shutdown = 0;
Wiimote_Output = 0;
Wiimote_GetAttachedControllers = 0;
Wiimote_DoState = 0;
}
bool LoadPlugin(const char *_Filename)
{
if (plugin.Load(_Filename))
{
GetDllInfo = reinterpret_cast<TGetDllInfo> (plugin.Get("GetDllInfo"));
DllAbout = reinterpret_cast<TDllAbout> (plugin.Get("DllAbout"));
DllConfig = reinterpret_cast<TDllConfig> (plugin.Get("DllConfig"));
Wiimote_Initialize = reinterpret_cast<TWiimote_Initialize> (plugin.Get("Wiimote_Initialize"));
Wiimote_Shutdown = reinterpret_cast<TWiimote_Shutdown> (plugin.Get("Wiimote_Shutdown"));
Wiimote_Output = reinterpret_cast<TWiimote_Output> (plugin.Get("Wiimote_Output"));
Wiimote_GetAttachedControllers = reinterpret_cast<TWiimote_GetAttachedControllers> (plugin.Get("Wiimote_GetAttachedControllers"));
Wiimote_DoState = reinterpret_cast<TWiimote_DoState> (plugin.Get("Wiimote_DoState"));
if ((GetDllInfo != 0) &&
(Wiimote_Initialize != 0) &&
(Wiimote_Shutdown != 0) &&
(Wiimote_Output != 0) &&
(Wiimote_GetAttachedControllers != 0) &&
(Wiimote_DoState != 0))
{
return true;
}
else
{
UnloadPlugin();
return false;
}
}
return false;
}
} // namespace

View File

@ -0,0 +1,51 @@
// 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 _PLUGIN_WIIMOTE_H
#define _PLUGIN_WIIMOTE_H
#include "pluginspecs_wiimote.h"
namespace PluginWiimote
{
bool IsLoaded();
bool LoadPlugin(const char *_Filename);
void UnloadPlugin();
// Function Types
typedef void (__cdecl* TGetDllInfo)(PLUGIN_INFO*);
typedef void (__cdecl* TDllAbout)(HWND);
typedef void (__cdecl* TDllConfig)(HWND);
typedef void (__cdecl* TWiimote_Initialize)(SWiimoteInitialize);
typedef void (__cdecl* TWiimote_Shutdown)();
typedef void (__cdecl* TWiimote_Output)(const void* _pData, u32 _Size);
typedef unsigned int (__cdecl* TWiimote_GetAttachedControllers)();
typedef void (__cdecl* TWiimote_DoState)(void *ptr, int mode);
// Function Pointers
extern TGetDllInfo GetDllInfo;
extern TDllAbout DllAbout;
extern TDllConfig DllConfig;
extern TWiimote_Initialize Wiimote_Initialize;
extern TWiimote_Shutdown Wiimote_Shutdown;
extern TWiimote_Output Wiimote_Output;
extern TWiimote_GetAttachedControllers Wiimote_GetAttachedControllers;
extern TWiimote_DoState Wiimote_DoState;
} // end of namespace PluginWiimote
#endif //_PLUGIN_WIIMOTE_H

View File

@ -126,224 +126,6 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="&quot;$(ProjectDir)..\Common\SubWCRev.exe&quot; &quot;$(SolutionDir)\.&quot; &quot;$(ProjectDir)..\Common\src\svnrev_template.h&quot; &quot;$(ProjectDir)..\Common\src\svnrev.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="WIN32,_DEBUG,__WXMSW__,__WXDEBUG__,_WINDOWS,NOPCH"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\vc_mswd/toolbar.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/EHsc "
Optimization="0"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DiscIO\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\DebuggerWX\src"
PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
FloatingPointModel="0"
TreatWChar_tAsBuiltInType="true"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
WarningLevel="4"
WarnAsError="false"
SuppressStartupBanner="true"
DebugInformationFormat="3"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG,__WXMSW__,__WXDEBUG__,_WINDOWS,NOPCH"
Culture="1033"
AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswd;.\..\..\include;.;.\..\..\samples"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/TLBID:1"
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib LZO.lib"
OutputFile="../../../Binary/Win32/DolphinWxD.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\wxWidgets\lib\lib32;..\..\..\Externals\LZO\win32\$(ConfigurationName)"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
SubSystem="2"
BaseAddress="0x00400000"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\vc_mswd/toolbar.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="&quot;$(ProjectDir)..\Common\SubWCRev.exe&quot; &quot;$(SolutionDir)\.&quot; &quot;$(ProjectDir)..\Common\src\svnrev_template.h&quot; &quot;$(ProjectDir)..\Common\src\svnrev.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="WIN32,__WXMSW__,_WINDOWS,NOPCH"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\vc_msw/toolbar.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/EHsc "
Optimization="2"
InlineFunctionExpansion="1"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DiscIO\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\DebuggerWX\src"
PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="2"
FloatingPointModel="0"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
WarningLevel="4"
WarnAsError="false"
SuppressStartupBanner="true"
DebugInformationFormat="3"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="__WXMSW__,_WINDOWS,NOPCH"
Culture="1033"
AdditionalIncludeDirectories=".\..\..\lib\vc_lib\msw;.\..\..\include;.;.\..\..\samples"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib LZO.lib"
OutputFile="../../../Binary/Win32/DolphinWxDF.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\wxWidgets\lib\lib32;..\..\..\Externals\LZO\win32\$(ConfigurationName)"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
SubSystem="2"
LargeAddressAware="1"
BaseAddress="0x00400000"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\vc_msw/toolbar.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -454,6 +236,114 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="&quot;$(ProjectDir)..\Common\SubWCRev.exe&quot; &quot;$(SolutionDir)\.&quot; &quot;$(ProjectDir)..\Common\src\svnrev_template.h&quot; &quot;$(ProjectDir)..\Common\src\svnrev.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="WIN32,_DEBUG,__WXMSW__,__WXDEBUG__,_WINDOWS,NOPCH"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\vc_mswd/toolbar.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/EHsc "
Optimization="0"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DiscIO\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\DebuggerWX\src"
PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
FloatingPointModel="0"
TreatWChar_tAsBuiltInType="true"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
WarningLevel="4"
WarnAsError="false"
SuppressStartupBanner="true"
DebugInformationFormat="3"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG,__WXMSW__,__WXDEBUG__,_WINDOWS,NOPCH"
Culture="1033"
AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswd;.\..\..\include;.;.\..\..\samples"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/TLBID:1"
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib LZO.lib"
OutputFile="../../../Binary/Win32/DolphinWxD.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\wxWidgets\lib\lib32;..\..\..\Externals\LZO\win32\$(ConfigurationName)"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
SubSystem="2"
BaseAddress="0x00400000"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\vc_mswd/toolbar.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -562,6 +452,116 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="&quot;$(ProjectDir)..\Common\SubWCRev.exe&quot; &quot;$(SolutionDir)\.&quot; &quot;$(ProjectDir)..\Common\src\svnrev_template.h&quot; &quot;$(ProjectDir)..\Common\src\svnrev.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="WIN32,__WXMSW__,_WINDOWS,NOPCH"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\vc_msw/toolbar.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/EHsc "
Optimization="2"
InlineFunctionExpansion="1"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\Common\Src;..\Core\Src;..\DiscIO\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\DebuggerWX\src"
PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="2"
FloatingPointModel="0"
RuntimeTypeInfo="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
WarningLevel="4"
WarnAsError="false"
SuppressStartupBanner="true"
DebugInformationFormat="3"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="__WXMSW__,_WINDOWS,NOPCH"
Culture="1033"
AdditionalIncludeDirectories=".\..\..\lib\vc_lib\msw;.\..\..\include;.;.\..\..\samples"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib rpcrt4.lib winmm.lib LZO.lib"
OutputFile="../../../Binary/Win32/DolphinWxDF.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\Externals\wxWidgets\lib\lib32;..\..\..\Externals\LZO\win32\$(ConfigurationName)"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
SubSystem="2"
LargeAddressAware="1"
BaseAddress="0x00400000"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\vc_msw/toolbar.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -889,22 +889,6 @@
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="DebugFast|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
@ -913,6 +897,14 @@
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -921,6 +913,14 @@
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="DebugFast|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="DebugFast|x64"
>

View File

@ -82,7 +82,14 @@ void CPluginOptions::CreateGUIControls()
PADText = new wxStaticText(this, ID_PAD_TEXT, wxT("PAD:"), wxDefaultPosition, wxDefaultSize);
FillChoiceBox(PADSelection, PLUGIN_TYPE_PAD, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin);
WiimoteSelection = new wxChoice(this, ID_GRAPHIC_CB, wxDefaultPosition, wxDefaultSize, NULL, 0, wxDefaultValidator);
WiimoteAbout = new wxButton(this, ID_GRAPHIC_ABOUT, wxT("About..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiimoteConfig = new wxButton(this, ID_GRAPHIC_CONFIG, wxT("Config..."), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
WiimoteText = new wxStaticText(this, ID_GRAPHIC_TEXT, wxT("Wiimote:"), wxDefaultPosition, wxDefaultSize);
FillChoiceBox(WiimoteSelection, PLUGIN_TYPE_WIIMOTE, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin);
wxGridBagSizer* sConfig;
sConfig = new wxGridBagSizer(0, 0);
sConfig->SetFlexibleDirection(wxBOTH);
@ -101,6 +108,12 @@ void CPluginOptions::CreateGUIControls()
sConfig->Add(PADSelection, wxGBPosition(4, 1), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
sConfig->Add(PADConfig, wxGBPosition(4, 3), wxGBSpan(1, 1), wxALL, 5);
sConfig->Add(PADAbout, wxGBPosition(4, 4), wxGBSpan(1, 1), wxALL, 5);
sConfig->Add(WiimoteText, wxGBPosition(6, 0), wxGBSpan(2, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sConfig->Add(WiimoteSelection, wxGBPosition(6, 1), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
sConfig->Add(WiimoteConfig, wxGBPosition(6, 3), wxGBSpan(1, 1), wxALL, 5);
sConfig->Add(WiimoteAbout, wxGBPosition(6, 4), wxGBSpan(1, 1), wxALL, 5);
sConfig->Layout();
wxBoxSizer* sButtons;
@ -258,6 +271,7 @@ void CPluginOptions::DoApply()
GetFilename(GraphicSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin);
GetFilename(DSPSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin);
GetFilename(PADSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin);
GetFilename(WiimoteSelection, SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin);
SConfig::GetInstance().SaveSettings();
}

View File

@ -61,6 +61,10 @@ class CPluginOptions
wxButton* GraphicConfig;
wxStaticText* GraphicText;
wxChoice* GraphicSelection;
wxButton* WiimoteAbout;
wxButton* WiimoteConfig;
wxStaticText* WiimoteText;
wxChoice* WiimoteSelection;
////GUI Control Declaration End
private:
@ -72,6 +76,10 @@ class CPluginOptions
enum
{
////GUI Enum Control ID Start
ID_WIIMOTE_ABOUT = 1038,
ID_WIIMOTE_CONFIG = 1037,
ID_WIIMOTE_TEXT = 1036,
ID_WIIMOTE_CB = 1035,
ID_CANCEL = 1034,
ID_APPLY = 1033,
ID_OK = 1032,

View File

@ -1,4 +1,3 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "Core\Core\Core.vcproj", "{F0B874CB-4476-4199-9315-8343D05AE684}"
@ -43,15 +42,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Core\Common\Commo
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DolphinWX", "Core\DolphinWX\DolphinWX.vcproj", "{A72606EF-C5C1-4954-90AD-F0F93A8D97D9}"
ProjectSection(ProjectDependencies) = postProject
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{33546D62-7F34-4EA6-A88E-D538B36E16BF} = {33546D62-7F34-4EA6-A88E-D538B36E16BF}
{B7F1A9FB-BEA8-416E-9460-AE35A6A5165C} = {B7F1A9FB-BEA8-416E-9460-AE35A6A5165C}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
{F0B874CB-4476-4199-9315-8343D05AE684} = {F0B874CB-4476-4199-9315-8343D05AE684}
{4D3CD4C5-412B-4B49-9B1B-A68A2A129C77} = {4D3CD4C5-412B-4B49-9B1B-A68A2A129C77}
{29C2ABC1-ADA5-42CD-A5FC-96022D52A510} = {29C2ABC1-ADA5-42CD-A5FC-96022D52A510}
{3E03C179-8251-46E4-81F4-466F114BAC63} = {3E03C179-8251-46E4-81F4-466F114BAC63}
{33546D62-7F34-4EA6-A88E-D538B36E16BF} = {33546D62-7F34-4EA6-A88E-D538B36E16BF}
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxBase28", "..\Externals\wxWidgets\build\msw\wx_base.vcproj", "{48AD7E0A-25B1-4974-A1E3-03F8C438D34F}"
@ -88,6 +87,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_DSP_HLE", "Plugins\P
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LZO", "..\Externals\LZO\LZO.vcproj", "{33546D62-7F34-4EA6-A88E-D538B36E16BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Plugin_Wiimote_Test", "Plugins\Plugin_Wiimote_Test\Plugin_Wiimote_Test.vcproj", "{8D612734-FAA5-4B8A-804F-4DEA2367D495}"
ProjectSection(ProjectDependencies) = postProject
{48AD7E0A-25B1-4974-A1E3-03F8C438D34F} = {48AD7E0A-25B1-4974-A1E3-03F8C438D34F}
{0318BA30-EF48-441A-9E10-DC85EFAE39F0} = {0318BA30-EF48-441A-9E10-DC85EFAE39F0}
{C573CAF7-EE6A-458E-8049-16C0BF34C2E9} = {C573CAF7-EE6A-458E-8049-16C0BF34C2E9}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -314,6 +320,18 @@ Global
{33546D62-7F34-4EA6-A88E-D538B36E16BF}.Release|Win32.Build.0 = Release|Win32
{33546D62-7F34-4EA6-A88E-D538B36E16BF}.Release|x64.ActiveCfg = Release|x64
{33546D62-7F34-4EA6-A88E-D538B36E16BF}.Release|x64.Build.0 = Release|x64
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.Debug|Win32.ActiveCfg = Debug|Win32
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.Debug|Win32.Build.0 = Debug|Win32
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.Debug|x64.ActiveCfg = Debug|x64
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.Debug|x64.Build.0 = Debug|x64
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.DebugFast|Win32.ActiveCfg = DebugFast|Win32
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.DebugFast|Win32.Build.0 = DebugFast|Win32
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.DebugFast|x64.ActiveCfg = DebugFast|x64
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.DebugFast|x64.Build.0 = DebugFast|x64
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.Release|Win32.ActiveCfg = Release|Win32
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.Release|Win32.Build.0 = Release|Win32
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.Release|x64.ActiveCfg = Release|x64
{8D612734-FAA5-4B8A-804F-4DEA2367D495}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -52,6 +52,7 @@ extern "C" {
#define PLUGIN_TYPE_AUDIO 4
#define PLUGIN_TYPE_COMPILER 5
#define PLUGIN_TYPE_DSP 6
#define PLUGIN_TYPE_WIIMOTE 7
#define STATE_MODE_READ 1
#define STATE_MODE_WRITE 2

View File

@ -0,0 +1,102 @@
//__________________________________________________________________________________________________
// Common wiimote plugin spec, unversioned
//
#ifndef _WIIMOTE_H_INCLUDED__
#define _WIIMOTE_H_INCLUDED__
#include "PluginSpecs.h"
#include "ExportProlog.h"
typedef void (*TLog)(const char* _pMessage);
// Called when the Wiimote sends input reports to the Core.
// Payload: an HID packet.
typedef void (*TWiimoteInput)(const void* _pData, u32 _Size);
// This data is passed from the core on initialization.
typedef struct
{
HWND hWnd;
TLog pLog;
TWiimoteInput pWiimoteInput;
} SWiimoteInitialize;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// I N T E R F A C E ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
// __________________________________________________________________________________________________
// Function: GetDllInfo
// Purpose: This function allows the emulator to gather information
// about the DLL by filling in the PluginInfo structure.
// input: a pointer to a PLUGIN_INFO structure that needs to be
// filled by the function. (see def above)
// output: none
//
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// Function: DllAbout
// Purpose: This function is optional function that is provided
// to give further information about the DLL.
// input: a handle to the window that calls this function
// output: none
//
EXPORT void CALL DllAbout(HWND _hParent);
// __________________________________________________________________________________________________
// Function: DllConfig
// Purpose: This function is optional function that is provided
// to allow the user to configure the DLL
// input: a handle to the window that calls this function
// output: none
//
EXPORT void CALL DllConfig(HWND _hParent);
// __________________________________________________________________________________________________
// Function:
// Purpose:
// input: WiimoteInitialize
// output: none
//
EXPORT void CALL Wiimote_Initialize(SWiimoteInitialize _WiimoteInitialize);
// __________________________________________________________________________________________________
// Function: Wiimote_Shutdown
// Purpose: This function is called when the emulator is closing
// down allowing the DLL to de-initialise.
// input: none
// output: none
//
EXPORT void CALL Wiimote_Shutdown();
// __________________________________________________________________________________________________
// Function: Wiimote_Output
// Purpose: An HID packed is passed from the Core to the Wiimote.
// input: Da pakket.
// output: none
//
EXPORT void CALL Wiimote_Output(const void* _pData, u32 _Size);
// __________________________________________________________________________________________________
// Function: PAD_GetAttachedPads
// Purpose: Get mask of attached pads (eg: controller 1 & 4 -> 0x9)
// input: none
// output: number of pads
//
EXPORT unsigned int CALL Wiimote_GetAttachedControllers();
// __________________________________________________________________________________________________
// Function: Wiimote_DoState
// Purpose: Saves/load state
// input/output: ptr
// input: mode
//
EXPORT void CALL Wiimote_DoState(void *ptr, int mode);
#include "ExportEpilog.h"
#endif //_WIIMOTE_H_INCLUDED__

View File

@ -0,0 +1,521 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="Plugin_Wiimote_Test"
ProjectGUID="{8D612734-FAA5-4B8A-804F-4DEA2367D495}"
RootNamespace="Plugin_Wiimote_Test"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib winmm.lib rpcrt4.lib"
OutputFile="..\..\..\Binary\Win32/Plugins\Plugin_WiimoteTestD.dll"
LinkIncremental="1"
GenerateManifest="false"
GenerateDebugInformation="true"
SubSystem="0"
OptimizeReferences="0"
EnableCOMDATFolding="0"
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"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib winmm.lib rpcrt4.lib"
OutputFile="..\..\..\Binary\Win32/Plugins\Plugin_WiimoteTestD.dll"
LinkIncremental="1"
GenerateManifest="false"
GenerateDebugInformation="true"
SubSystem="0"
OptimizeReferences="0"
EnableCOMDATFolding="0"
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="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS"
RuntimeLibrary="0"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib winmm.lib rpcrt4.lib"
OutputFile="..\..\..\Binary\Win32/Plugins\Plugin_WiimoteTest.dll"
LinkIncremental="1"
GenerateManifest="false"
GenerateDebugInformation="false"
SubSystem="0"
OptimizeReferences="0"
EnableCOMDATFolding="0"
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"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS"
RuntimeLibrary="0"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib winmm.lib rpcrt4.lib"
OutputFile="..\..\..\Binary\Win32/Plugins\Plugin_WiimoteTest.dll"
LinkIncremental="1"
GenerateManifest="false"
GenerateDebugInformation="false"
SubSystem="0"
OptimizeReferences="0"
EnableCOMDATFolding="0"
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="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="DEBUGFAST;WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS"
RuntimeLibrary="0"
WarningLevel="3"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib rpcrt4.lib"
OutputFile="..\..\..\Binary\Win32\Plugins\Plugin_WiimoteTestDF.dll"
LinkIncremental="1"
GenerateManifest="false"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
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"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\PluginSpecs;..\..\..\Externals\SDL\include;..\..\Core\Common\Src;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGIN_WIIMOTE_TEST_EXPORTS"
RuntimeLibrary="0"
WarningLevel="3"
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib rpcrt4.lib"
OutputFile="..\..\..\Binary\Win32\Plugins\Plugin_WiimoteTestDF.dll"
LinkIncremental="1"
GenerateManifest="false"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
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>
<File
RelativePath=".\Src\main.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,23 @@
Import('env')
import sys
if sys.platform == 'darwin':
output = "../../../../Binary/mac/Plugins/Plugin_Wiimote_Test.so"
else:
output = "../../../../Binary/linux/Plugins/Plugin_Wiimote_Test.so"
files = [
"main.cpp",
]
padenv = env.Copy()
padenv.Append(
CXXFLAGS = ' ' + ' '.join([
'-fPIC', '`wx-config --cppflags`', '`pkg-config --cflags sdl`'
]),
LINKFLAGS = ' ' + ' '.join([
'`wx-config --libs`', '`pkg-config --libs sdl`'
])
)
padenv.SharedLibrary(output, files, LIBS = [ "common" ])

View File

@ -0,0 +1,58 @@
#include <wx/aboutdlg.h>
#include "pluginspecs_wiimote.h"
SWiimoteInitialize g_WiimoteInitialize;
#define VERSION_STRING "0.1"
void GetDllInfo (PLUGIN_INFO* _PluginInfo)
{
_PluginInfo->Version = 0x0100;
_PluginInfo->Type = PLUGIN_TYPE_WIIMOTE;
#ifdef DEBUGFAST
sprintf(_PluginInfo->Name, "Wiimote Test (DebugFast) " VERSION_STRING);
#else
#ifndef _DEBUG
sprintf(_PluginInfo->Name, "Wiimote Test " VERSION_STRING);
#else
sprintf(_PluginInfo->Name, "Wiimote Test (Debug) " VERSION_STRING);
#endif
#endif
}
void DllAbout(HWND _hParent)
{
wxAboutDialogInfo info;
info.AddDeveloper(_T("masken (masken3@gmail.com)"));
info.SetDescription(_T("Wiimote test plugin"));
wxAboutBox(info);
}
void DllConfig(HWND _hParent)
{
}
void Wiimote_Initialize(SWiimoteInitialize* _pWiimoteInitialize)
{
if (_pWiimoteInitialize == NULL)
return;
g_WiimoteInitialize = *_pWiimoteInitialize;
}
void Wiimote_DoState(unsigned char **ptr, int mode) {
}
void Wiimote_Shutdown(void)
{
}
void Wiimote_Output(const void* _pData, u32 _Size) {
}
unsigned int Wiimote_GetAttachedControllers() {
return 1;
}