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
|
||||
#define DEFINITIONS_H_INCLUDED
|
||||
|
||||
#include "Log.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#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
|
||||
// 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_WARNING(...) { GENERIC_LOG(WIIMOTE, WARNING_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 */
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int wiiuse_connect(struct wiimote_t** wm, int wiimotes) {
|
||||
int i,connected=0;
|
||||
for (i = 0; i < wiimotes; ++i) {
|
||||
|
@ -181,7 +170,6 @@ int wiiuse_connect(struct wiimote_t** wm, int wiimotes) {
|
|||
return connected;
|
||||
}
|
||||
|
||||
|
||||
void wiiuse_disconnect(struct wiimote_t* wm) {
|
||||
if (!wm || WIIMOTE_IS_CONNECTED(wm))
|
||||
return;
|
||||
|
@ -197,7 +185,6 @@ void wiiuse_disconnect(struct wiimote_t* wm) {
|
|||
WIIMOTE_DISABLE_STATE(wm, WIIMOTE_STATE_HANDSHAKE);
|
||||
}
|
||||
|
||||
|
||||
int wiiuse_io_read(struct wiimote_t* wm) {
|
||||
DWORD b, r;
|
||||
|
||||
|
@ -243,7 +230,6 @@ int wiiuse_io_read(struct wiimote_t* wm) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int wiiuse_io_write(struct wiimote_t* wm, byte* buf, int len) {
|
||||
DWORD bytes, dw;
|
||||
int i;
|
||||
|
@ -374,9 +360,6 @@ int wiiuse_register_system_notification(HWND hwnd) {
|
|||
return RegisterDeviceNotification(hwnd,&Filter, DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int wiiuse_remove(struct wiimote_t** wm, int wiimotes, int max_wiimotes) {
|
||||
int i = 0;
|
||||
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 */
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
#ifndef WIIUSE_H_INCLUDED
|
||||
#define WIIUSE_H_INCLUDED
|
||||
|
||||
//#define WITH_WIIUSE_DEBUG
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#elif defined(__APPLE__)
|
||||
|
@ -187,6 +185,8 @@ typedef struct wiimote_t {
|
|||
*
|
||||
*****************************************/
|
||||
|
||||
#define WIIUSE_COMPILE_LIB
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIIUSE_EXPORT_DECL __declspec(dllexport)
|
||||
#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"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
|
@ -43,9 +43,10 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\Source\Core\Common\Src"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeLibrary="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
|
@ -59,17 +60,14 @@
|
|||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalDependencies="hid.lib setupapi.lib Common.lib"
|
||||
OutputFile="$(PlatformName)\$(ProjectName)d.lib"
|
||||
AdditionalLibraryDirectories=""..\..\Source\Core\Common\$(PlatformName)\DebugFast""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
|
@ -79,9 +77,6 @@
|
|||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
@ -90,7 +85,7 @@
|
|||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
|
@ -112,9 +107,10 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\Source\Core\Common\Src"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeLibrary="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
|
@ -128,17 +124,14 @@
|
|||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="17"
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalDependencies="hid.lib setupapi.lib Common.lib"
|
||||
OutputFile="$(PlatformName)\$(ProjectName)d.lib"
|
||||
AdditionalLibraryDirectories=""..\..\Source\Core\Common\$(PlatformName)\DebugFast""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
|
@ -148,9 +141,6 @@
|
|||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
@ -159,7 +149,7 @@
|
|||
Name="Release|Win32"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
|
@ -182,7 +172,8 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
AdditionalIncludeDirectories="..\..\Source\Core\Common\Src"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
|
@ -197,19 +188,14 @@
|
|||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalDependencies="hid.lib setupapi.lib Common.lib"
|
||||
OutputFile="$(PlatformName)\$(ProjectName).lib"
|
||||
AdditionalLibraryDirectories=""..\..\Source\Core\Common\$(PlatformName)\Release""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
|
@ -219,9 +205,6 @@
|
|||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
@ -230,7 +213,7 @@
|
|||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
|
@ -254,7 +237,8 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
RuntimeLibrary="2"
|
||||
AdditionalIncludeDirectories="..\..\Source\Core\Common\Src"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
|
@ -269,19 +253,14 @@
|
|||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib"
|
||||
GenerateDebugInformation="true"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="17"
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalDependencies="Ws2_32.lib hid.lib setupapi.lib Common.lib"
|
||||
OutputFile="$(PlatformName)\$(ProjectName).lib"
|
||||
AdditionalLibraryDirectories=""..\..\Source\Core\Common\$(PlatformName)\Release""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
|
@ -291,9 +270,6 @@
|
|||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue