From 1c86790e04e22a40fd700ba33e10bb7c8849dd7f Mon Sep 17 00:00:00 2001 From: Mark Klara Date: Thu, 11 Nov 2021 23:36:15 -0800 Subject: [PATCH] Uncomment the network loop code in main. (#431) --- switch/source/main.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/switch/source/main.cpp b/switch/source/main.cpp index daab890..0fadd41 100644 --- a/switch/source/main.cpp +++ b/switch/source/main.cpp @@ -62,10 +62,9 @@ int main(void) if (g_currentUId == 0) g_currentUId = userIds.at(0); - // TODO: UNCOMMENT ME - // Thread networkThread; - // threadCreate(&networkThread, (ThreadFunc)networkLoop, nullptr, nullptr, 16 * 1000, 0x2C, -2); - // threadStart(&networkThread); + Thread networkThread; + threadCreate(&networkThread, (ThreadFunc)networkLoop, nullptr, nullptr, 16 * 1000, 0x2C, -2); + threadStart(&networkThread); while (appletMainLoop()) { padUpdate(&pad); @@ -83,11 +82,10 @@ int main(void) SDLH_Render(); } - // TODO: uncomment me - // g_shouldExitNetworkLoop = true; - // threadWaitForExit(&networkThread); - // threadClose(&networkThread); + g_shouldExitNetworkLoop = true; + threadWaitForExit(&networkThread); + threadClose(&networkThread); servicesExit(); exit(0); -} \ No newline at end of file +}