From 6f2f9349c498fa34640eef5971eff6245369d516 Mon Sep 17 00:00:00 2001 From: cathery Date: Fri, 22 Nov 2019 01:49:14 +0300 Subject: [PATCH] pass function by address in input/output threads --- SwitchUSB/source/SwitchVirtualGamepadHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SwitchUSB/source/SwitchVirtualGamepadHandler.cpp b/SwitchUSB/source/SwitchVirtualGamepadHandler.cpp index 5ae0711..1ef34bc 100644 --- a/SwitchUSB/source/SwitchVirtualGamepadHandler.cpp +++ b/SwitchUSB/source/SwitchVirtualGamepadHandler.cpp @@ -45,7 +45,7 @@ void outputThreadLoop(void *handler) Result SwitchVirtualGamepadHandler::InitInputThread() { m_keepInputThreadRunning = true; - Result rc = threadCreate(&m_inputThread, inputThreadLoop, this, NULL, 0x400, 0x3B, -2); + Result rc = threadCreate(&m_inputThread, &inputThreadLoop, this, NULL, 0x400, 0x3B, -2); if (R_FAILED(rc)) return rc; return threadStart(&m_inputThread); @@ -61,7 +61,7 @@ void SwitchVirtualGamepadHandler::ExitInputThread() Result SwitchVirtualGamepadHandler::InitOutputThread() { m_keepOutputThreadRunning = true; - Result rc = threadCreate(&m_outputThread, outputThreadLoop, this, NULL, 0x400, 0x3B, -2); + Result rc = threadCreate(&m_outputThread, &outputThreadLoop, this, NULL, 0x400, 0x3B, -2); if (R_FAILED(rc)) return rc; return threadStart(&m_outputThread);