1
0
mirror of https://github.com/cathery/sys-con.git synced 2024-12-25 00:13:52 +00:00

pass function by address in input/output threads

This commit is contained in:
cathery 2019-11-22 01:49:14 +03:00
parent d1ccd23813
commit 6f2f9349c4

View File

@ -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);