summaryrefslogtreecommitdiff
path: root/src/maingui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/maingui.cpp')
-rw-r--r--src/maingui.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/maingui.cpp b/src/maingui.cpp
index 8b0ddd218..05231134c 100644
--- a/src/maingui.cpp
+++ b/src/maingui.cpp
@@ -98,7 +98,8 @@ PRAGMA48(GCC diagnostic pop)
#include "debug.h"
#ifdef __SWITCH__
-extern "C" {
+extern "C"
+{
#include <switch/runtime/devices/socket.h>
#include <switch/runtime/nxlink.h>
}
@@ -106,18 +107,22 @@ extern "C" {
#include <unistd.h>
static int sock = -1;
#endif
-void nxInit() {
+void nxInit()
+{
socketInitializeDefault();
#ifndef NDEBUG
sock = nxlinkStdio();
- if (sock < 0) {
+ if (sock < 0)
+ {
socketExit();
}
#endif
}
-void NxDeinit() {
+void NxDeinit()
+{
#ifndef NDEBUG
- if (sock >= 0) {
+ if (sock >= 0)
+ {
close(sock);
sock = -1;
}