wiiusesrc: change back to .c files, in order to more easily diff with "official" wiiuse

wiiusesrc: enable building with windows/msvc. In order to build you need to install WDK, then build. wiiuse.vcproj uses WDK exclusively, and ignores other include/lib paths. Change the paths in wiiuse.vcproj if your version of WDK differs.
wiiuse: update compiled windows libs

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4295 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2009-09-18 00:51:13 +00:00
commit 9ae7fe20af
20 changed files with 55 additions and 56 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -8,19 +8,19 @@ if not (env['HAVE_BLUEZ'] or sys.platform == 'darwin'):
Return() Return()
files = [ files = [
"classic.cpp", "classic.c",
"dynamics.cpp", "dynamics.c",
"events.cpp", "events.c",
"io.cpp", "io.c",
"ir.cpp", "ir.c",
"nunchuk.cpp", "nunchuk.c",
"guitar_hero_3.cpp", "guitar_hero_3.c",
"wiiboard.cpp", "wiiboard.c",
"wiiuse.cpp", "wiiuse.c",
] ]
if env['HAVE_BLUEZ']: if env['HAVE_BLUEZ']:
files += [ "io_nix.cpp", ] files += [ "io_nix.c", ]
if sys.platform == 'darwin': if sys.platform == 'darwin':
files += [ "io_osx.m", ] files += [ "io_osx.m", ]

View file

@ -34,11 +34,9 @@
#ifndef CONNECT_H_INCLUDED #ifndef CONNECT_H_INCLUDED
#define CONNECT_H_INCLUDED #define CONNECT_H_INCLUDED
#ifndef WIN32 #ifdef __linux__
#if !defined(__APPLE__)
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>
#endif #endif
#endif
#include "wiiuse_internal.h" #include "wiiuse_internal.h"

View file

@ -663,7 +663,7 @@ static float ir_distance(struct ir_dot_t* dot) {
xd = dot[i2].x - dot[i1].x; xd = dot[i2].x - dot[i1].x;
yd = dot[i2].y - dot[i1].y; yd = dot[i2].y - dot[i1].y;
return sqrt(float(xd*xd + yd*yd)); return sqrt(xd*xd + yd*yd);
} }

View file

@ -123,12 +123,10 @@ struct wiimote_t** wiiuse_init(int wiimotes) {
wm[i]->unid = i+1; wm[i]->unid = i+1;
#ifndef WIN32 #ifdef __linux__
#if !defined(__APPLE__)
wm[i]->bdaddr = *BDADDR_ANY; wm[i]->bdaddr = *BDADDR_ANY;
wm[i]->out_sock = -1; wm[i]->out_sock = -1;
wm[i]->in_sock = -1; wm[i]->in_sock = -1;
#endif
#else #else
wm[i]->dev_handle = 0; wm[i]->dev_handle = 0;
wm[i]->stack = WIIUSE_STACK_UNKNOWN; wm[i]->stack = WIIUSE_STACK_UNKNOWN;

View file

@ -563,7 +563,7 @@ typedef struct wiimote_t {
#if defined(__APPLE__) #if defined(__APPLE__)
WCONST char bdaddr[10]; /**< bt address on osx addr are string */ WCONST char bdaddr[10]; /**< bt address on osx addr are string */
#else #else
WCONST bdaddr_t bdaddr; /**< bt address */ WCONST bdaddr_t bdaddr; /**< bt address (linux) */
#endif #endif
WCONST char bdaddr_str[18]; /**< readable bt address */ WCONST char bdaddr_str[18]; /**< readable bt address */
WCONST int out_sock; /**< output socket */ WCONST int out_sock; /**< output socket */

View file

@ -44,12 +44,10 @@
#ifndef WIIUSE_INTERNAL_H_INCLUDED #ifndef WIIUSE_INTERNAL_H_INCLUDED
#define WIIUSE_INTERNAL_H_INCLUDED #define WIIUSE_INTERNAL_H_INCLUDED
#ifndef WIN32 #ifdef __linux__
#if !defined(__APPLE__)
#include <arpa/inet.h> /* htons() */ #include <arpa/inet.h> /* htons() */
#include <bluetooth/bluetooth.h> #include <bluetooth/bluetooth.h>
#endif #endif
#endif
#include "definitions.h" #include "definitions.h"

View file

@ -4,6 +4,7 @@
Version="9.00" Version="9.00"
Name="wiiuse" Name="wiiuse"
ProjectGUID="{944EF6DE-471D-447E-A2FD-D37D58805169}" ProjectGUID="{944EF6DE-471D-447E-A2FD-D37D58805169}"
RootNamespace="wiiuse"
TargetFrameworkVersion="0" TargetFrameworkVersion="0"
> >
<Platforms> <Platforms>
@ -25,7 +26,7 @@
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -52,10 +53,11 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\DDK_HID\Include" AdditionalIncludeDirectories="C:\WinDDK\7600.16385.0\inc\api;C:\WinDDK\7600.16385.0\inc\crt"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS"
IgnoreStandardIncludePath="true"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\win32\Release/wiiuse.pch" PrecompiledHeaderFile=".\win32\Release/wiiuse.pch"
AssemblerListingLocation=".\win32\Release/" AssemblerListingLocation=".\win32\Release/"
@ -78,14 +80,14 @@
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib" AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib"
OutputFile=".\win32\Release/wiiuse.dll" OutputFile="..\WiiUse\$(PlatformName)\wiiuse.dll"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\DDK_HID\win32" AdditionalLibraryDirectories="C:\WinDDK\7600.16385.0\lib\win7\i386"
ProgramDatabaseFile=".\win32\Release/wiiuse.pdb" ProgramDatabaseFile=".\win32\Release/wiiuse.pdb"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
ImportLibrary=".\win32\Release/wiiuse.lib" ImportLibrary="$(TargetDir)\$(TargetName).lib"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
@ -120,7 +122,7 @@
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -147,10 +149,11 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\DDK_HID\Include" AdditionalIncludeDirectories="C:\WinDDK\7600.16385.0\inc\api;C:\WinDDK\7600.16385.0\inc\crt"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS;_WIN64" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS;_WIN64"
IgnoreStandardIncludePath="true"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\x64\Release/wiiuse.pch" PrecompiledHeaderFile=".\x64\Release/wiiuse.pch"
AssemblerListingLocation=".\x64\Release/" AssemblerListingLocation=".\x64\Release/"
@ -173,14 +176,14 @@
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib" AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib"
OutputFile=".\x64\Release/wiiuse.dll" OutputFile="..\WiiUse\$(PlatformName)\wiiuse.dll"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="true" SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\DDK_HID\x64" AdditionalLibraryDirectories="C:\WinDDK\7600.16385.0\lib\win7\amd64"
ProgramDatabaseFile=".\x64\Release/wiiuse.pdb" ProgramDatabaseFile=".\x64\Release/wiiuse.pdb"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
ImportLibrary=".\x64\Release/wiiuse.lib" ImportLibrary="$(TargetDir)\$(TargetName).lib"
TargetMachine="17" TargetMachine="17"
/> />
<Tool <Tool
@ -215,7 +218,7 @@
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -241,11 +244,12 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\DDK_HID\Include" AdditionalIncludeDirectories="C:\WinDDK\7600.16385.0\inc\api;C:\WinDDK\7600.16385.0\inc\crt"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS;WITH_WIIUSE_DEBUG" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS;WITH_WIIUSE_DEBUG"
IgnoreStandardIncludePath="true"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="3"
PrecompiledHeaderFile=".\win32\Debug/wiiuse.pch" PrecompiledHeaderFile=".\win32\Debug/wiiuse.pch"
AssemblerListingLocation=".\win32\Debug/" AssemblerListingLocation=".\win32\Debug/"
ObjectFile=".\win32\Debug/" ObjectFile=".\win32\Debug/"
@ -268,15 +272,15 @@
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib" AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib"
OutputFile=".\win32\Debug/wiiuse.dll" OutputFile="..\WiiUse\$(PlatformName)\wiiused.dll"
LinkIncremental="2" LinkIncremental="2"
SuppressStartupBanner="true" SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\DDK_HID\win32" AdditionalLibraryDirectories="C:\WinDDK\7600.16385.0\lib\win7\i386"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile=".\win32\Debug/wiiuse.pdb" ProgramDatabaseFile=".\win32\Debug/wiiuse.pdb"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
ImportLibrary=".\win32\Debug/wiiuse.lib" ImportLibrary="$(TargetDir)\$(TargetName).lib"
TargetMachine="1" TargetMachine="1"
/> />
<Tool <Tool
@ -311,7 +315,7 @@
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0" UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false" ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2" CharacterSet="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -337,11 +341,12 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\DDK_HID\Include" AdditionalIncludeDirectories="C:\WinDDK\7600.16385.0\inc\api;C:\WinDDK\7600.16385.0\inc\crt"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS;WITH_WIIUSE_DEBUG" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WIIUSE_EXPORTS;WITH_WIIUSE_DEBUG"
IgnoreStandardIncludePath="true"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="3"
PrecompiledHeaderFile=".\x64\Debug/wiiuse.pch" PrecompiledHeaderFile=".\x64\Debug/wiiuse.pch"
AssemblerListingLocation=".\x64\Debug/" AssemblerListingLocation=".\x64\Debug/"
ObjectFile=".\x64\Debug/" ObjectFile=".\x64\Debug/"
@ -364,15 +369,15 @@
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib" AdditionalDependencies="odbc32.lib odbccp32.lib Ws2_32.lib hid.lib setupapi.lib"
OutputFile=".\x64\Debug/wiiuse.dll" OutputFile="..\WiiUse\$(PlatformName)\wiiused.dll"
LinkIncremental="2" LinkIncremental="2"
SuppressStartupBanner="true" SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\DDK_HID\x64" AdditionalLibraryDirectories="C:\WinDDK\7600.16385.0\lib\win7\amd64"
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile=".\x64\Debug/wiiuse.pdb" ProgramDatabaseFile=".\x64\Debug/wiiuse.pdb"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
ImportLibrary=".\x64\Debug/wiiuse.lib" ImportLibrary="$(TargetDir)\$(TargetName).lib"
TargetMachine="17" TargetMachine="17"
/> />
<Tool <Tool
@ -407,7 +412,7 @@
Name="Expansion Devices" Name="Expansion Devices"
> >
<File <File
RelativePath=".\Src\classic.cpp" RelativePath=".\Src\classic.c"
> >
</File> </File>
<File <File
@ -415,7 +420,7 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\guitar_hero_3.cpp" RelativePath=".\Src\guitar_hero_3.c"
> >
</File> </File>
<File <File
@ -423,7 +428,7 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\nunchuk.cpp" RelativePath=".\Src\nunchuk.c"
> >
</File> </File>
<File <File
@ -431,7 +436,7 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\wiiboard.cpp" RelativePath=".\Src\wiiboard.c"
> >
</File> </File>
<File <File
@ -443,7 +448,7 @@
Name="I/O" Name="I/O"
> >
<File <File
RelativePath=".\Src\io.cpp" RelativePath=".\Src\io.c"
> >
</File> </File>
<File <File
@ -451,7 +456,7 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\io_nix.cpp" RelativePath=".\Src\io_nix.c"
> >
</File> </File>
<File <File
@ -459,7 +464,7 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\io_win.cpp" RelativePath=".\Src\io_win.c"
> >
</File> </File>
</Filter> </Filter>
@ -467,7 +472,7 @@
Name="Wiimote Data" Name="Wiimote Data"
> >
<File <File
RelativePath=".\Src\dynamics.cpp" RelativePath=".\Src\dynamics.c"
> >
</File> </File>
<File <File
@ -475,7 +480,7 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\events.cpp" RelativePath=".\Src\events.c"
> >
</File> </File>
<File <File
@ -483,7 +488,7 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\ir.cpp" RelativePath=".\Src\ir.c"
> >
</File> </File>
<File <File
@ -512,7 +517,7 @@
> >
</File> </File>
<File <File
RelativePath=".\Src\wiiuse.cpp" RelativePath=".\Src\wiiuse.c"
> >
</File> </File>
<File <File