diff --git a/Externals/WiiUse/Win32/wiiuse.dll b/Externals/WiiUse/Win32/wiiuse.dll index 6b52becf21..9f46d61707 100644 Binary files a/Externals/WiiUse/Win32/wiiuse.dll and b/Externals/WiiUse/Win32/wiiuse.dll differ diff --git a/Externals/WiiUse/Win32/wiiuse.lib b/Externals/WiiUse/Win32/wiiuse.lib index bf093f2f25..9848aa48e9 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 index 24905a297d..4f90a44261 100644 Binary files a/Externals/WiiUse/X64/wiiuse.dll and b/Externals/WiiUse/X64/wiiuse.dll differ diff --git a/Externals/WiiUse/X64/wiiuse.lib b/Externals/WiiUse/X64/wiiuse.lib index f0013849ea..432b14d5d9 100644 Binary files a/Externals/WiiUse/X64/wiiuse.lib and b/Externals/WiiUse/X64/wiiuse.lib differ diff --git a/Externals/WiiUseSrc/Src/SConscript b/Externals/WiiUseSrc/Src/SConscript index edd1dcde52..5f00273bf9 100644 --- a/Externals/WiiUseSrc/Src/SConscript +++ b/Externals/WiiUseSrc/Src/SConscript @@ -8,19 +8,19 @@ if not (env['HAVE_BLUEZ'] or sys.platform == 'darwin'): Return() files = [ - "classic.cpp", - "dynamics.cpp", - "events.cpp", - "io.cpp", - "ir.cpp", - "nunchuk.cpp", - "guitar_hero_3.cpp", - "wiiboard.cpp", - "wiiuse.cpp", + "classic.c", + "dynamics.c", + "events.c", + "io.c", + "ir.c", + "nunchuk.c", + "guitar_hero_3.c", + "wiiboard.c", + "wiiuse.c", ] if env['HAVE_BLUEZ']: - files += [ "io_nix.cpp", ] + files += [ "io_nix.c", ] if sys.platform == 'darwin': files += [ "io_osx.m", ] diff --git a/Externals/WiiUseSrc/Src/classic.cpp b/Externals/WiiUseSrc/Src/classic.c similarity index 100% rename from Externals/WiiUseSrc/Src/classic.cpp rename to Externals/WiiUseSrc/Src/classic.c diff --git a/Externals/WiiUseSrc/Src/dynamics.cpp b/Externals/WiiUseSrc/Src/dynamics.c similarity index 100% rename from Externals/WiiUseSrc/Src/dynamics.cpp rename to Externals/WiiUseSrc/Src/dynamics.c diff --git a/Externals/WiiUseSrc/Src/events.cpp b/Externals/WiiUseSrc/Src/events.c similarity index 100% rename from Externals/WiiUseSrc/Src/events.cpp rename to Externals/WiiUseSrc/Src/events.c diff --git a/Externals/WiiUseSrc/Src/guitar_hero_3.cpp b/Externals/WiiUseSrc/Src/guitar_hero_3.c similarity index 100% rename from Externals/WiiUseSrc/Src/guitar_hero_3.cpp rename to Externals/WiiUseSrc/Src/guitar_hero_3.c diff --git a/Externals/WiiUseSrc/Src/io.cpp b/Externals/WiiUseSrc/Src/io.c similarity index 100% rename from Externals/WiiUseSrc/Src/io.cpp rename to Externals/WiiUseSrc/Src/io.c diff --git a/Externals/WiiUseSrc/Src/io.h b/Externals/WiiUseSrc/Src/io.h index 6f16e78d52..838bbf5c2b 100644 --- a/Externals/WiiUseSrc/Src/io.h +++ b/Externals/WiiUseSrc/Src/io.h @@ -34,11 +34,9 @@ #ifndef CONNECT_H_INCLUDED #define CONNECT_H_INCLUDED -#ifndef WIN32 -#if !defined(__APPLE__) +#ifdef __linux__ #include #endif -#endif #include "wiiuse_internal.h" diff --git a/Externals/WiiUseSrc/Src/io_nix.cpp b/Externals/WiiUseSrc/Src/io_nix.c similarity index 100% rename from Externals/WiiUseSrc/Src/io_nix.cpp rename to Externals/WiiUseSrc/Src/io_nix.c diff --git a/Externals/WiiUseSrc/Src/io_win.cpp b/Externals/WiiUseSrc/Src/io_win.c similarity index 100% rename from Externals/WiiUseSrc/Src/io_win.cpp rename to Externals/WiiUseSrc/Src/io_win.c diff --git a/Externals/WiiUseSrc/Src/ir.cpp b/Externals/WiiUseSrc/Src/ir.c similarity index 99% rename from Externals/WiiUseSrc/Src/ir.cpp rename to Externals/WiiUseSrc/Src/ir.c index 3438105c77..7a9bb68289 100644 --- a/Externals/WiiUseSrc/Src/ir.cpp +++ b/Externals/WiiUseSrc/Src/ir.c @@ -663,7 +663,7 @@ static float ir_distance(struct ir_dot_t* dot) { xd = dot[i2].x - dot[i1].x; yd = dot[i2].y - dot[i1].y; - return sqrt(float(xd*xd + yd*yd)); + return sqrt(xd*xd + yd*yd); } diff --git a/Externals/WiiUseSrc/Src/nunchuk.cpp b/Externals/WiiUseSrc/Src/nunchuk.c similarity index 100% rename from Externals/WiiUseSrc/Src/nunchuk.cpp rename to Externals/WiiUseSrc/Src/nunchuk.c diff --git a/Externals/WiiUseSrc/Src/wiiboard.cpp b/Externals/WiiUseSrc/Src/wiiboard.c similarity index 100% rename from Externals/WiiUseSrc/Src/wiiboard.cpp rename to Externals/WiiUseSrc/Src/wiiboard.c diff --git a/Externals/WiiUseSrc/Src/wiiuse.cpp b/Externals/WiiUseSrc/Src/wiiuse.c similarity index 99% rename from Externals/WiiUseSrc/Src/wiiuse.cpp rename to Externals/WiiUseSrc/Src/wiiuse.c index 19277f2c05..21880fa876 100644 --- a/Externals/WiiUseSrc/Src/wiiuse.cpp +++ b/Externals/WiiUseSrc/Src/wiiuse.c @@ -123,12 +123,10 @@ struct wiimote_t** wiiuse_init(int wiimotes) { wm[i]->unid = i+1; - #ifndef WIN32 - #if !defined(__APPLE__) + #ifdef __linux__ wm[i]->bdaddr = *BDADDR_ANY; wm[i]->out_sock = -1; wm[i]->in_sock = -1; - #endif #else wm[i]->dev_handle = 0; wm[i]->stack = WIIUSE_STACK_UNKNOWN; diff --git a/Externals/WiiUseSrc/Src/wiiuse.h b/Externals/WiiUseSrc/Src/wiiuse.h index 5ac1fd2202..04b04fe958 100644 --- a/Externals/WiiUseSrc/Src/wiiuse.h +++ b/Externals/WiiUseSrc/Src/wiiuse.h @@ -563,7 +563,7 @@ typedef struct wiimote_t { #if defined(__APPLE__) WCONST char bdaddr[10]; /**< bt address on osx addr are string */ #else - WCONST bdaddr_t bdaddr; /**< bt address */ + WCONST bdaddr_t bdaddr; /**< bt address (linux) */ #endif WCONST char bdaddr_str[18]; /**< readable bt address */ WCONST int out_sock; /**< output socket */ diff --git a/Externals/WiiUseSrc/Src/wiiuse_internal.h b/Externals/WiiUseSrc/Src/wiiuse_internal.h index cd77d57307..3277f6de63 100644 --- a/Externals/WiiUseSrc/Src/wiiuse_internal.h +++ b/Externals/WiiUseSrc/Src/wiiuse_internal.h @@ -44,12 +44,10 @@ #ifndef WIIUSE_INTERNAL_H_INCLUDED #define WIIUSE_INTERNAL_H_INCLUDED -#ifndef WIN32 -#if !defined(__APPLE__) +#ifdef __linux__ #include /* htons() */ #include #endif -#endif #include "definitions.h" diff --git a/Externals/WiiUseSrc/wiiuse.vcproj b/Externals/WiiUseSrc/wiiuse.vcproj index 4396a27ead..fe4a45d6a5 100644 --- a/Externals/WiiUseSrc/wiiuse.vcproj +++ b/Externals/WiiUseSrc/wiiuse.vcproj @@ -4,6 +4,7 @@ Version="9.00" Name="wiiuse" ProjectGUID="{944EF6DE-471D-447E-A2FD-D37D58805169}" + RootNamespace="wiiuse" TargetFrameworkVersion="0" > @@ -25,7 +26,7 @@ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="2" + CharacterSet="1" > @@ -467,7 +472,7 @@ Name="Wiimote Data" >