Skip to content

Commit ffadce5

Browse files
committed
Fix compilation issues
1 parent 24407dc commit ffadce5

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

WindowsDriver/WindowsDriver/WindowsDriver.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,13 @@
119119
<IntrinsicFunctions>true</IntrinsicFunctions>
120120
<SDLCheck>true</SDLCheck>
121121
<ConformanceMode>true</ConformanceMode>
122+
<AdditionalIncludeDirectories>$(SolutionDir)Libs\ViGEm\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
122123
</ClCompile>
123124
<Link>
124125
<SubSystem>Console</SubSystem>
125126
<EnableCOMDATFolding>true</EnableCOMDATFolding>
126127
<OptimizeReferences>true</OptimizeReferences>
128+
<AdditionalDependencies>$(SolutionDir)Libs\ViGEm\bin\release\x64\ViGEmClient.lib;Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
127129
</Link>
128130
</ItemDefinitionGroup>
129131
<ItemGroup>

WindowsDriver/WindowsDriver/feeder.cpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
#include "feeder.h"
22
#include "controller_conversion.h"
33

4+
5+
/*
6+
Commands:
7+
1 - get, read 14 bytes after
8+
2 - poweroff
9+
3 - cb, write 2 bytes after, 1st byte - left rumble, 2nd - right rumble
10+
*/
11+
static uint8_t get[1] = { 1 };
12+
static uint8_t poweroff[1] = { 2 };
13+
static uint8_t cb = 3;
414
feeder::feeder(const char* hostname, int port) : udp_client(hostname, port) {
515
this->driver_client = vigem_alloc();
616
if (this->driver_client == nullptr) {
@@ -61,19 +71,6 @@ void feeder::controller_callback(PVIGEM_CLIENT Client,
6171
f->udp_client.client_write(data, 3);
6272
}
6373

64-
65-
66-
67-
/*
68-
Commands:
69-
1 - get, read 14 bytes after
70-
2 - poweroff
71-
3 - cb, write 2 bytes after, 1st byte - left rumble, 2nd - right rumble
72-
*/
73-
static uint8_t get[1] = { 1 };
74-
static uint8_t poweroff[1] = { 2 };
75-
static uint8_t cb = 3;
76-
7774
void feeder::feed() {
7875
uint8_t* buf = new uint8_t[14];
7976
uint8_t data[2]{ 0 };

0 commit comments

Comments
 (0)