fix(reversenx): fix reversenx sync connect error
This commit is contained in:
@@ -1,28 +1,21 @@
|
|||||||
diff --git a/Overlay/Makefile b/Overlay/Makefile
|
diff --git a/Overlay/Makefile b/Overlay/Makefile
|
||||||
index 5a2c2af..140130b 100644
|
index 9656834..3b2ebd5 100644
|
||||||
--- a/Overlay/Makefile
|
--- a/Overlay/Makefile
|
||||||
+++ b/Overlay/Makefile
|
+++ b/Overlay/Makefile
|
||||||
@@ -38,7 +38,7 @@ include $(DEVKITPRO)/libnx/switch_rules
|
@@ -38,7 +38,7 @@ include $(DEVKITPRO)/libnx/switch_rules
|
||||||
# NACP building is skipped as well.
|
# NACP building is skipped as well.
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
APP_TITLE := ReverseNX-RT
|
APP_TITLE := ReverseNX-RT
|
||||||
-APP_VERSION := 1.0.2
|
-APP_VERSION := 1.1.1
|
||||||
+APP_VERSION := 1.1.0-OC
|
+APP_VERSION := 1.1.1-OC
|
||||||
|
|
||||||
TARGET := ReverseNX-RT-ovl
|
TARGET := ReverseNX-RT-ovl
|
||||||
BUILD := build
|
BUILD := build
|
||||||
diff --git a/Overlay/libs/Atmosphere-libs b/Overlay/libs/Atmosphere-libs
|
|
||||||
index 2d522dc..af0d008 160000
|
|
||||||
--- a/Overlay/libs/Atmosphere-libs
|
|
||||||
+++ b/Overlay/libs/Atmosphere-libs
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-Subproject commit 2d522dc6a12b2eb5eb3f103a8c5b5126ca301b1a
|
|
||||||
+Subproject commit af0d008900128d8679b80569f69fe562ed7d6681
|
|
||||||
diff --git a/Overlay/source/main.cpp b/Overlay/source/main.cpp
|
diff --git a/Overlay/source/main.cpp b/Overlay/source/main.cpp
|
||||||
index 810295c..87b6685 100644
|
index 810295c..6dc7135 100644
|
||||||
--- a/Overlay/source/main.cpp
|
--- a/Overlay/source/main.cpp
|
||||||
+++ b/Overlay/source/main.cpp
|
+++ b/Overlay/source/main.cpp
|
||||||
@@ -1,7 +1,196 @@
|
@@ -1,7 +1,198 @@
|
||||||
#define TESLA_INIT_IMPL // If you have more than one file using the tesla header, only define this in the main one
|
#define TESLA_INIT_IMPL // If you have more than one file using the tesla header, only define this in the main one
|
||||||
#include <tesla.hpp> // The Tesla Header
|
#include <tesla.hpp> // The Tesla Header
|
||||||
+#include <atomic>
|
+#include <atomic>
|
||||||
@@ -115,12 +108,14 @@ index 810295c..87b6685 100644
|
|||||||
+ Result rc = 0;
|
+ Result rc = 0;
|
||||||
+ refCnt++;
|
+ refCnt++;
|
||||||
+
|
+
|
||||||
+ if (serviceIsActive(&service))
|
+ //if (serviceIsActive(&service))
|
||||||
+ return 0;
|
+ // return 0;
|
||||||
+
|
+
|
||||||
+ rc = smGetService(&service, SERVICE_NAME);
|
+ rc = smGetService(&service, SERVICE_NAME);
|
||||||
+
|
+
|
||||||
+ if (R_FAILED(rc)) {
|
+ if (R_FAILED(rc)) {
|
||||||
|
+ this->ipcStatus = IpcStatus_InitFailed;
|
||||||
|
+ rc = this->ipcStatus;
|
||||||
+ this->Exit();
|
+ this->Exit();
|
||||||
+ return rc;
|
+ return rc;
|
||||||
+ }
|
+ }
|
||||||
@@ -163,10 +158,10 @@ index 810295c..87b6685 100644
|
|||||||
+ return this->ipcStatus;
|
+ return this->ipcStatus;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (R_FAILED(this->Init())) {
|
+ /* if (R_FAILED(this->Init())) {
|
||||||
+ this->ipcStatus = IpcStatus_InitFailed;
|
+ this->ipcStatus = IpcStatus_InitFailed;
|
||||||
+ return this->ipcStatus;
|
+ return this->ipcStatus;
|
||||||
+ }
|
+ } */
|
||||||
+
|
+
|
||||||
+ tsl::hlp::ScopeGuard exitSrvGuard([&] { this->Exit(); });
|
+ tsl::hlp::ScopeGuard exitSrvGuard([&] { this->Exit(); });
|
||||||
+
|
+
|
||||||
@@ -219,7 +214,7 @@ index 810295c..87b6685 100644
|
|||||||
bool* def = 0;
|
bool* def = 0;
|
||||||
bool* isDocked = 0;
|
bool* isDocked = 0;
|
||||||
bool* pluginActive = 0;
|
bool* pluginActive = 0;
|
||||||
@@ -17,6 +206,7 @@ bool plugin = false;
|
@@ -17,6 +208,7 @@ bool plugin = false;
|
||||||
char DockedChar[32];
|
char DockedChar[32];
|
||||||
char SystemChar[32];
|
char SystemChar[32];
|
||||||
char PluginChar[36];
|
char PluginChar[36];
|
||||||
@@ -227,7 +222,7 @@ index 810295c..87b6685 100644
|
|||||||
uint64_t PID = 0;
|
uint64_t PID = 0;
|
||||||
Handle remoteSharedMemory = 1;
|
Handle remoteSharedMemory = 1;
|
||||||
SharedMemory _sharedmemory = {};
|
SharedMemory _sharedmemory = {};
|
||||||
@@ -73,7 +263,7 @@ bool CheckPort () {
|
@@ -73,7 +265,7 @@ bool CheckPort () {
|
||||||
|
|
||||||
class GuiTest : public tsl::Gui {
|
class GuiTest : public tsl::Gui {
|
||||||
public:
|
public:
|
||||||
@@ -236,7 +231,7 @@ index 810295c..87b6685 100644
|
|||||||
|
|
||||||
// Called when this Gui gets loaded to create the UI
|
// Called when this Gui gets loaded to create the UI
|
||||||
// Allocate all elements on the heap. libtesla will make sure to clean them up when not needed anymore
|
// Allocate all elements on the heap. libtesla will make sure to clean them up when not needed anymore
|
||||||
@@ -112,6 +302,7 @@ public:
|
@@ -112,6 +304,7 @@ public:
|
||||||
else {
|
else {
|
||||||
renderer->drawString(SystemChar, false, x, y+40, 20, renderer->a(0xFFFF));
|
renderer->drawString(SystemChar, false, x, y+40, 20, renderer->a(0xFFFF));
|
||||||
renderer->drawString(DockedChar, false, x, y+60, 20, renderer->a(0xFFFF));
|
renderer->drawString(DockedChar, false, x, y+60, 20, renderer->a(0xFFFF));
|
||||||
@@ -244,7 +239,7 @@ index 810295c..87b6685 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}), 100);
|
}), 100);
|
||||||
@@ -190,6 +381,8 @@ public:
|
@@ -190,6 +383,8 @@ public:
|
||||||
|
|
||||||
if (_def) sprintf(SystemChar, "Controlled by system: Yes");
|
if (_def) sprintf(SystemChar, "Controlled by system: Yes");
|
||||||
else sprintf(SystemChar, "Controlled by system: No");
|
else sprintf(SystemChar, "Controlled by system: No");
|
||||||
@@ -253,7 +248,7 @@ index 810295c..87b6685 100644
|
|||||||
}
|
}
|
||||||
else i++;
|
else i++;
|
||||||
}
|
}
|
||||||
@@ -200,6 +393,8 @@ public:
|
@@ -200,6 +395,8 @@ public:
|
||||||
virtual bool handleInput(u64 keysDown, u64 keysHeld, const HidTouchState &touchPos, HidAnalogStickState joyStickPosLeft, HidAnalogStickState joyStickPosRight) override {
|
virtual bool handleInput(u64 keysDown, u64 keysHeld, const HidTouchState &touchPos, HidAnalogStickState joyStickPosLeft, HidAnalogStickState joyStickPosRight) override {
|
||||||
return false; // Return true here to singal the inputs have been consumed
|
return false; // Return true here to singal the inputs have been consumed
|
||||||
}
|
}
|
||||||
@@ -262,12 +257,10 @@ index 810295c..87b6685 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
class OverlayTest : public tsl::Overlay {
|
class OverlayTest : public tsl::Overlay {
|
||||||
@@ -247,10 +442,12 @@ public:
|
@@ -248,9 +445,11 @@ public:
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
-
|
|
||||||
+
|
|
||||||
+ modeSync = new ModeSync;
|
+ modeSync = new ModeSync;
|
||||||
} // Called at the start to initialize all services necessary for this Overlay
|
} // Called at the start to initialize all services necessary for this Overlay
|
||||||
|
|
||||||
@@ -276,7 +269,7 @@ index 810295c..87b6685 100644
|
|||||||
shmemClose(&_sharedmemory);
|
shmemClose(&_sharedmemory);
|
||||||
fsdevUnmountDevice("sdmc");
|
fsdevUnmountDevice("sdmc");
|
||||||
} // Callet at the end to clean up all services previously initialized
|
} // Callet at the end to clean up all services previously initialized
|
||||||
@@ -260,8 +457,10 @@ public:
|
@@ -260,8 +459,10 @@ public:
|
||||||
virtual void onHide() override {} // Called before overlay wants to change from visible to invisible state
|
virtual void onHide() override {} // Called before overlay wants to change from visible to invisible state
|
||||||
|
|
||||||
virtual std::unique_ptr<tsl::Gui> loadInitialGui() override {
|
virtual std::unique_ptr<tsl::Gui> loadInitialGui() override {
|
||||||
|
|||||||
Reference in New Issue
Block a user