Skip to content

Commit 9a4f95c

Browse files
committed
ControllerHotPlug: only call SetThreadDescription in debug builds
1 parent eed47ce commit 9a4f95c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hooks_input.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ class ControllerHotPlug : public Hook
146146

147147
static void DeviceEnumerationThread()
148148
{
149+
#ifdef _DEBUG
149150
SetThreadDescription(GetCurrentThread(), L"DeviceEnumerationThread");
151+
#endif
150152

151153
while (true)
152154
{
@@ -169,7 +171,7 @@ class ControllerHotPlug : public Hook
169171

170172
bool apply() override
171173
{
172-
// Patch game to go through our DInput_EnumJoysticksCallback func, so we can learn GUID of any already connected pads
174+
// Patch games controller init code to go through our DInput_EnumJoysticksCallback func, so we can learn GUID of any already connected pads
173175
Memory::VP::Patch(Module::exe_ptr(DInputInit_CallbackPtr_Addr + 1), DInput_EnumJoysticksCallback);
174176

175177
return true;

0 commit comments

Comments
 (0)