build wiiuse as a static lib on windows.
make wiiuse log via Common lib on windows. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6386 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c0bdf4de81
commit
ae8c943669
|
@ -34,9 +34,17 @@
|
||||||
#ifndef DEFINITIONS_H_INCLUDED
|
#ifndef DEFINITIONS_H_INCLUDED
|
||||||
#define DEFINITIONS_H_INCLUDED
|
#define DEFINITIONS_H_INCLUDED
|
||||||
|
|
||||||
|
#include "Log.h"
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <arpa/inet.h> /* htons() */
|
#include <arpa/inet.h> /* htons() */
|
||||||
#include "Log.h"
|
#else
|
||||||
|
/* disable warnings I don't care about */
|
||||||
|
#pragma warning(disable:4244) /* possible loss of data conversion */
|
||||||
|
#pragma warning(disable:4273) /* inconsistent dll linkage */
|
||||||
|
#pragma warning(disable:4217)
|
||||||
|
|
||||||
|
#endif // _WIN32
|
||||||
|
|
||||||
// NOTICE_LEVEL is more appropriate for the uses of WIIUSE_INFO than INFO_LEVEL
|
// NOTICE_LEVEL is more appropriate for the uses of WIIUSE_INFO than INFO_LEVEL
|
||||||
// as long as we don't provide adequate GUI feedback for bluetooth events.
|
// as long as we don't provide adequate GUI feedback for bluetooth events.
|
||||||
|
@ -44,32 +52,6 @@
|
||||||
#define WIIUSE_ERROR(...) { GENERIC_LOG(WIIMOTE, ERROR_LEVEL, __VA_ARGS__) }
|
#define WIIUSE_ERROR(...) { GENERIC_LOG(WIIMOTE, ERROR_LEVEL, __VA_ARGS__) }
|
||||||
#define WIIUSE_WARNING(...) { GENERIC_LOG(WIIMOTE, WARNING_LEVEL, __VA_ARGS__) }
|
#define WIIUSE_WARNING(...) { GENERIC_LOG(WIIMOTE, WARNING_LEVEL, __VA_ARGS__) }
|
||||||
#define WIIUSE_DEBUG(...) { GENERIC_LOG(WIIMOTE, DEBUG_LEVEL, __VA_ARGS__) }
|
#define WIIUSE_DEBUG(...) { GENERIC_LOG(WIIMOTE, DEBUG_LEVEL, __VA_ARGS__) }
|
||||||
#else
|
|
||||||
|
|
||||||
/* disable warnings I don't care about */
|
|
||||||
#pragma warning(disable:4244) /* possible loss of data conversion */
|
|
||||||
#pragma warning(disable:4273) /* inconsistent dll linkage */
|
|
||||||
#pragma warning(disable:4217)
|
|
||||||
|
|
||||||
|
|
||||||
#define WIIUSE_ERROR(fmt, ...) fprintf(stderr, "[ERROR] " fmt "\n", ##__VA_ARGS__)
|
|
||||||
|
|
||||||
#define WIIUSE_WARNING(fmt, ...) fprintf(stderr, "[WARNING] " fmt "\n", ##__VA_ARGS__)
|
|
||||||
|
|
||||||
#define WIIUSE_INFO(fmt, ...) fprintf(stderr, "[INFO] " fmt "\n", ##__VA_ARGS__)
|
|
||||||
|
|
||||||
#ifdef WITH_WIIUSE_DEBUG
|
|
||||||
#define WIIUSE_DEBUG(fmt, ...) do { \
|
|
||||||
char* file = __FILE__; \
|
|
||||||
int i = strlen(file) - 1; \
|
|
||||||
for (; i && (file[i] != '\\'); --i); \
|
|
||||||
fprintf(stderr, "[DEBUG] %s:%i: " fmt "\n", file+i+1, __LINE__, ##__VA_ARGS__); \
|
|
||||||
} while (0)
|
|
||||||
#else
|
|
||||||
#define WIIUSE_DEBUG(fmt, ...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _WIN32
|
|
||||||
|
|
||||||
/* Convert to big endian */
|
/* Convert to big endian */
|
||||||
#define BIG_ENDIAN_LONG(i) (htonl(i))
|
#define BIG_ENDIAN_LONG(i) (htonl(i))
|
||||||
|
|
|
@ -160,17 +160,6 @@ int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int wiimotes) {
|
||||||
return wiimotes;
|
return wiimotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int wiiuse_connect(struct wiimote_t** wm, int wiimotes) {
|
int wiiuse_connect(struct wiimote_t** wm, int wiimotes) {
|
||||||
int i,connected=0;
|
int i,connected=0;
|
||||||
for (i = 0; i < wiimotes; ++i) {
|
for (i = 0; i < wiimotes; ++i) {
|
||||||
|
@ -181,7 +170,6 @@ int wiiuse_connect(struct wiimote_t** wm, int wiimotes) {
|
||||||
return connected;
|
return connected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void wiiuse_disconnect(struct wiimote_t* wm) {
|
void wiiuse_disconnect(struct wiimote_t* wm) {
|
||||||
if (!wm || WIIMOTE_IS_CONNECTED(wm))
|
if (!wm || WIIMOTE_IS_CONNECTED(wm))
|
||||||
return;
|
return;
|
||||||
|
@ -197,7 +185,6 @@ void wiiuse_disconnect(struct wiimote_t* wm) {
|
||||||
WIIMOTE_DISABLE_STATE(wm, WIIMOTE_STATE_HANDSHAKE);
|
WIIMOTE_DISABLE_STATE(wm, WIIMOTE_STATE_HANDSHAKE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int wiiuse_io_read(struct wiimote_t* wm) {
|
int wiiuse_io_read(struct wiimote_t* wm) {
|
||||||
DWORD b, r;
|
DWORD b, r;
|
||||||
|
|
||||||
|
@ -243,7 +230,6 @@ int wiiuse_io_read(struct wiimote_t* wm) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int wiiuse_io_write(struct wiimote_t* wm, byte* buf, int len) {
|
int wiiuse_io_write(struct wiimote_t* wm, byte* buf, int len) {
|
||||||
DWORD bytes, dw;
|
DWORD bytes, dw;
|
||||||
int i;
|
int i;
|
||||||
|
@ -374,9 +360,6 @@ int wiiuse_register_system_notification(HWND hwnd) {
|
||||||
return RegisterDeviceNotification(hwnd,&Filter, DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
|
return RegisterDeviceNotification(hwnd,&Filter, DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int wiiuse_remove(struct wiimote_t** wm, int wiimotes, int max_wiimotes) {
|
int wiiuse_remove(struct wiimote_t** wm, int wiimotes, int max_wiimotes) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
WIIUSE_INFO("Remove Wiimotes, WM: %i MAX_WM: %i",wiimotes, max_wiimotes);
|
WIIUSE_INFO("Remove Wiimotes, WM: %i MAX_WM: %i",wiimotes, max_wiimotes);
|
||||||
|
@ -399,5 +382,4 @@ int wiiuse_remove(struct wiimote_t** wm, int wiimotes, int max_wiimotes) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* ifdef _WIN32 */
|
#endif /* ifdef _WIN32 */
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
#ifndef WIIUSE_H_INCLUDED
|
#ifndef WIIUSE_H_INCLUDED
|
||||||
#define WIIUSE_H_INCLUDED
|
#define WIIUSE_H_INCLUDED
|
||||||
|
|
||||||
//#define WITH_WIIUSE_DEBUG
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
@ -187,6 +185,8 @@ typedef struct wiimote_t {
|
||||||
*
|
*
|
||||||
*****************************************/
|
*****************************************/
|
||||||
|
|
||||||
|
#define WIIUSE_COMPILE_LIB
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define WIIUSE_EXPORT_DECL __declspec(dllexport)
|
#define WIIUSE_EXPORT_DECL __declspec(dllexport)
|
||||||
#define WIIUSE_IMPORT_DECL __declspec(dllimport)
|
#define WIIUSE_IMPORT_DECL __declspec(dllimport)
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -22,7 +22,7 @@
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="2"
|
ConfigurationType="4"
|
||||||
CharacterSet="1"
|
CharacterSet="1"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -43,9 +43,10 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\Source\Core\Common\Src"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
/>
|
/>
|
||||||
|
@ -59,17 +60,14 @@
|
||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLibrarianTool"
|
||||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib"
|
AdditionalDependencies="hid.lib setupapi.lib Common.lib"
|
||||||
GenerateDebugInformation="true"
|
OutputFile="$(PlatformName)\$(ProjectName)d.lib"
|
||||||
TargetMachine="1"
|
AdditionalLibraryDirectories=""..\..\Source\Core\Common\$(PlatformName)\DebugFast""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXDCMakeTool"
|
Name="VCXDCMakeTool"
|
||||||
/>
|
/>
|
||||||
|
@ -79,9 +77,6 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
|
@ -90,7 +85,7 @@
|
||||||
Name="Debug|x64"
|
Name="Debug|x64"
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="2"
|
ConfigurationType="4"
|
||||||
CharacterSet="1"
|
CharacterSet="1"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -112,9 +107,10 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\Source\Core\Common\Src"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
/>
|
/>
|
||||||
|
@ -128,17 +124,14 @@
|
||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLibrarianTool"
|
||||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib"
|
AdditionalDependencies="hid.lib setupapi.lib Common.lib"
|
||||||
GenerateDebugInformation="true"
|
OutputFile="$(PlatformName)\$(ProjectName)d.lib"
|
||||||
TargetMachine="17"
|
AdditionalLibraryDirectories=""..\..\Source\Core\Common\$(PlatformName)\DebugFast""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXDCMakeTool"
|
Name="VCXDCMakeTool"
|
||||||
/>
|
/>
|
||||||
|
@ -148,9 +141,6 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
|
@ -159,7 +149,7 @@
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="2"
|
ConfigurationType="4"
|
||||||
CharacterSet="1"
|
CharacterSet="1"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
>
|
>
|
||||||
|
@ -182,7 +172,8 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
RuntimeLibrary="2"
|
AdditionalIncludeDirectories="..\..\Source\Core\Common\Src"
|
||||||
|
RuntimeLibrary="0"
|
||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
@ -197,19 +188,14 @@
|
||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLibrarianTool"
|
||||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib"
|
AdditionalDependencies="hid.lib setupapi.lib Common.lib"
|
||||||
GenerateDebugInformation="true"
|
OutputFile="$(PlatformName)\$(ProjectName).lib"
|
||||||
OptimizeReferences="2"
|
AdditionalLibraryDirectories=""..\..\Source\Core\Common\$(PlatformName)\Release""
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
TargetMachine="1"
|
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXDCMakeTool"
|
Name="VCXDCMakeTool"
|
||||||
/>
|
/>
|
||||||
|
@ -219,9 +205,6 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
|
@ -230,7 +213,7 @@
|
||||||
Name="Release|x64"
|
Name="Release|x64"
|
||||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="2"
|
ConfigurationType="4"
|
||||||
CharacterSet="1"
|
CharacterSet="1"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
>
|
>
|
||||||
|
@ -254,7 +237,8 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
RuntimeLibrary="2"
|
AdditionalIncludeDirectories="..\..\Source\Core\Common\Src"
|
||||||
|
RuntimeLibrary="0"
|
||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
|
@ -269,19 +253,14 @@
|
||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLibrarianTool"
|
||||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib"
|
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib Common.lib"
|
||||||
GenerateDebugInformation="true"
|
OutputFile="$(PlatformName)\$(ProjectName).lib"
|
||||||
OptimizeReferences="2"
|
AdditionalLibraryDirectories=""..\..\Source\Core\Common\$(PlatformName)\Release""
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
TargetMachine="17"
|
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCManifestTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXDCMakeTool"
|
Name="VCXDCMakeTool"
|
||||||
/>
|
/>
|
||||||
|
@ -291,9 +270,6 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCAppVerifierTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue