diff --git a/Externals/WiiUse/Src/definitions.h b/Externals/WiiUse/Src/definitions.h index 942d493e61..b08ee3e326 100644 --- a/Externals/WiiUse/Src/definitions.h +++ b/Externals/WiiUse/Src/definitions.h @@ -34,9 +34,17 @@ #ifndef DEFINITIONS_H_INCLUDED #define DEFINITIONS_H_INCLUDED +#include "Log.h" + #ifndef _WIN32 #include /* 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)) diff --git a/Externals/WiiUse/Src/io_win.c b/Externals/WiiUse/Src/io_win.c index 60b13479a2..4ce16d46b5 100644 --- a/Externals/WiiUse/Src/io_win.c +++ b/Externals/WiiUse/Src/io_win.c @@ -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 */ diff --git a/Externals/WiiUse/Src/wiiuse.h b/Externals/WiiUse/Src/wiiuse.h index 21d820bb2f..a7b18ce174 100644 --- a/Externals/WiiUse/Src/wiiuse.h +++ b/Externals/WiiUse/Src/wiiuse.h @@ -39,8 +39,6 @@ #ifndef WIIUSE_H_INCLUDED #define WIIUSE_H_INCLUDED -//#define WITH_WIIUSE_DEBUG - #ifdef _WIN32 #include #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) diff --git a/Externals/WiiUse/Win32/wiiuse.dll b/Externals/WiiUse/Win32/wiiuse.dll deleted file mode 100644 index 989e55f40a..0000000000 Binary files a/Externals/WiiUse/Win32/wiiuse.dll and /dev/null differ diff --git a/Externals/WiiUse/Win32/wiiuse.lib b/Externals/WiiUse/Win32/wiiuse.lib index 8d5a76b2fd..f7330f9f0f 100644 Binary files a/Externals/WiiUse/Win32/wiiuse.lib and b/Externals/WiiUse/Win32/wiiuse.lib differ diff --git a/Externals/WiiUse/X64/wiiuse.dll b/Externals/WiiUse/X64/wiiuse.dll deleted file mode 100644 index a818456452..0000000000 Binary files a/Externals/WiiUse/X64/wiiuse.dll and /dev/null differ diff --git a/Externals/WiiUse/X64/wiiuse.lib b/Externals/WiiUse/X64/wiiuse.lib index fa0c8499a9..4be14ac06b 100644 Binary files a/Externals/WiiUse/X64/wiiuse.lib and b/Externals/WiiUse/X64/wiiuse.lib differ diff --git a/Externals/WiiUse/wiiuse.vcproj b/Externals/WiiUse/wiiuse.vcproj index ae2491cd2c..ba3f7c4dc4 100644 --- a/Externals/WiiUse/wiiuse.vcproj +++ b/Externals/WiiUse/wiiuse.vcproj @@ -22,7 +22,7 @@ Name="Debug|Win32" OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="2" + ConfigurationType="4" CharacterSet="1" > @@ -59,17 +60,14 @@ Name="VCPreLinkEventTool" /> - @@ -79,9 +77,6 @@ - @@ -90,7 +85,7 @@ Name="Debug|x64" OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="2" + ConfigurationType="4" CharacterSet="1" > @@ -128,17 +124,14 @@ Name="VCPreLinkEventTool" /> - @@ -148,9 +141,6 @@ - @@ -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" /> - @@ -219,9 +205,6 @@ - @@ -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" /> - @@ -291,9 +270,6 @@ -