Skip to content

Commit

Permalink
Fix compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
localcc committed Oct 30, 2021
1 parent 24407dc commit ffadce5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 2 additions & 0 deletions WindowsDriver/WindowsDriver/WindowsDriver.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)Libs\ViGEm\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)Libs\ViGEm\bin\release\x64\ViGEmClient.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
23 changes: 10 additions & 13 deletions WindowsDriver/WindowsDriver/feeder.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#include "feeder.h"
#include "controller_conversion.h"


/*
Commands:
1 - get, read 14 bytes after
2 - poweroff
3 - cb, write 2 bytes after, 1st byte - left rumble, 2nd - right rumble
*/
static uint8_t get[1] = { 1 };
static uint8_t poweroff[1] = { 2 };
static uint8_t cb = 3;
feeder::feeder(const char* hostname, int port) : udp_client(hostname, port) {
this->driver_client = vigem_alloc();
if (this->driver_client == nullptr) {
Expand Down Expand Up @@ -61,19 +71,6 @@ void feeder::controller_callback(PVIGEM_CLIENT Client,
f->udp_client.client_write(data, 3);
}




/*
Commands:
1 - get, read 14 bytes after
2 - poweroff
3 - cb, write 2 bytes after, 1st byte - left rumble, 2nd - right rumble
*/
static uint8_t get[1] = { 1 };
static uint8_t poweroff[1] = { 2 };
static uint8_t cb = 3;

void feeder::feed() {
uint8_t* buf = new uint8_t[14];
uint8_t data[2]{ 0 };
Expand Down

0 comments on commit ffadce5

Please sign in to comment.