diff --git a/.gitignore b/.gitignore
index 58470f6..9d2dd21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ SdOut/
*.nacp
*.nro
*.lst
+*.gen.hpp
.vs/
bin/
obj/
diff --git a/.gitmodules b/.gitmodules
index 8af787a..38ac858 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,3 +4,6 @@
[submodule "Atmosphere-libs"]
path = libs/Atmosphere-libs
url = https://github.com/Atmosphere-NX/Atmosphere-libs
+[submodule "arc"]
+ path = arc
+ url = https://github.com/XorTroll/arc
diff --git a/Makefile b/Makefile
index 5061c84..cf6f1e2 100644
--- a/Makefile
+++ b/Makefile
@@ -5,15 +5,19 @@ VERSION := $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)
export UL_DEFS := -DUL_VERSION=\"$(VERSION)\"
-.PHONY: all fresh clean pu usystem uloader umenu umanager uscreen
+.PHONY: all fresh clean pu arc usystem uloader umenu umanager uscreen
-all: usystem uloader umenu umanager uscreen
+all: arc usystem uloader umenu umanager uscreen
fresh: clean all
pu:
@$(MAKE) -C libs/Plutonium/
+arc:
+ @python arc/arc.py gen_db default+./libs/uCommon/include/ul/ul_Results.rc.hpp
+ @python arc/arc.py gen_cpp rc UL ./libs/uCommon/include/ul/ul_Results.gen.hpp
+
clean:
@$(MAKE) clean -C projects/uSystem
@$(MAKE) clean -C projects/uLoader
diff --git a/arc b/arc
new file mode 160000
index 0000000..44cf5de
--- /dev/null
+++ b/arc
@@ -0,0 +1 @@
+Subproject commit 44cf5deecb2dc01b884e745206e51931684ad926
diff --git a/assets/default/Cursor.xcf b/assets/default/Cursor.xcf
new file mode 100644
index 0000000..3d41046
Binary files /dev/null and b/assets/default/Cursor.xcf differ
diff --git a/assets/uManager.xcf b/assets/uManager.xcf
index 6e50a54..dc19fc2 100644
Binary files a/assets/uManager.xcf and b/assets/uManager.xcf differ
diff --git a/libs/uCommon/include/extras/json.hpp b/libs/uCommon/include/extras/json.hpp
index a67eca7..33be870 100644
--- a/libs/uCommon/include/extras/json.hpp
+++ b/libs/uCommon/include/extras/json.hpp
@@ -18,13 +18,17 @@
#ifndef INCLUDE_NLOHMANN_JSON_HPP_
#define INCLUDE_NLOHMANN_JSON_HPP_
+//////////////////////////////////////////////////////////////////////////////////
// Custom config for this project
+
#include
-#define JSON_THROW_USER(exception) ::ul::OnAssertionFailed(::ul::res::ResultAssertionFailed, "JSON libraries threw " #exception "...\n")
+#define JSON_THROW_USER(exception) ::ul::OnAssertionFailed(::rc::ulaunch::ResultAssertionFailed, "JSON libraries threw " #exception "...\n")
#define JSON_TRY_USER if(true)
#define JSON_CATCH_USER(exception) if(false)
#define JSON_INTERNAL_CATCH_USER(exception) if(false)
+//////////////////////////////////////////////////////////////////////////////////
+
#include // all_of, find, for_each
#include // nullptr_t, ptrdiff_t, size_t
#include // hash, less
diff --git a/libs/uCommon/include/ul/smi/smi_Protocol.hpp b/libs/uCommon/include/ul/smi/smi_Protocol.hpp
index 7296f53..64c8511 100644
--- a/libs/uCommon/include/ul/smi/smi_Protocol.hpp
+++ b/libs/uCommon/include/ul/smi/smi_Protocol.hpp
@@ -1,7 +1,7 @@
#pragma once
#include
-#include
+#include
#include
namespace ul::smi {
diff --git a/libs/uCommon/include/ul/smi/smi_Results.hpp b/libs/uCommon/include/ul/smi/smi_Results.hpp
deleted file mode 100644
index 83f50a0..0000000
--- a/libs/uCommon/include/ul/smi/smi_Results.hpp
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#pragma once
-#include
-
-namespace ul::smi {
-
- UL_RC_DEFINE_SUBMODULE(1);
-
- UL_RC_DEFINE(OutOfPushSpace, 1);
- UL_RC_DEFINE(OutOfPopSpace, 2);
- UL_RC_DEFINE(InvalidInHeaderMagic, 3);
- UL_RC_DEFINE(InvalidOutHeaderMagic, 4);
- UL_RC_DEFINE(WaitTimeout, 5);
-
-}
\ No newline at end of file
diff --git a/libs/uCommon/include/ul/ul_Result.hpp b/libs/uCommon/include/ul/ul_Result.hpp
index f9b65e9..7186542 100644
--- a/libs/uCommon/include/ul/ul_Result.hpp
+++ b/libs/uCommon/include/ul/ul_Result.hpp
@@ -6,38 +6,15 @@
#include
#endif
+#include
+
namespace ul {
- // All 2380-**** results are from us
-
- constexpr u32 Module = 380;
- constexpr u32 SubmoduleOffset = 100;
-
- #define UL_RC_DEFINE_SUBMODULE(val) constexpr u32 Submodule = val
- #define UL_RC_DEFINE(name, val) constexpr Result Result ## name = MAKERESULT(Module, Submodule * SubmoduleOffset + val)
-
- constexpr Result ResultSuccess = 0;
-
- /*
-
- Result submodules:
- 0 -> misc
- 1 -> smi
- 2 -> sf (ipc)
- 3 -> loader
- 4 -> smi
- 5 -> util
- 6 -> menu
-
- */
+ using namespace rc;
+ using namespace rc::ulaunch;
namespace res {
- UL_RC_DEFINE_SUBMODULE(0);
-
- UL_RC_DEFINE(AssertionFailed, 1);
- UL_RC_DEFINE(InvalidTransform, 2);
-
template
inline ::Result TransformIntoResult(const T t) {
return static_cast<::Result>(t);
@@ -45,7 +22,7 @@ namespace ul {
#ifdef ATMOSPHERE
template<>
- inline ::Result TransformIntoResult(const ams::Result ams_rc) {
+ inline ::Result TransformIntoResult<::ams::Result>(const ::ams::Result ams_rc) {
return ams_rc.GetValue();
}
#endif
@@ -90,7 +67,7 @@ namespace ul {
#define UL_ASSERT_TRUE(expr) ({ \
const auto _tmp_expr = (expr); \
if(!_tmp_expr) { \
- ::ul::OnAssertionFailed(::ul::res::ResultAssertionFailed, #expr " asserted to be false...\n"); \
+ ::ul::OnAssertionFailed(::rc::ulaunch::ResultAssertionFailed, #expr " asserted to be false...\n"); \
} \
})
diff --git a/libs/uCommon/include/ul/ul_Results.rc.hpp b/libs/uCommon/include/ul/ul_Results.rc.hpp
new file mode 100644
index 0000000..2210639
--- /dev/null
+++ b/libs/uCommon/include/ul/ul_Results.rc.hpp
@@ -0,0 +1,38 @@
+R_DEFINE_NAMESPACE_RESULT_MODULE(ulaunch, 380);
+
+namespace ulaunch {
+
+ R_DEFINE_ERROR_RANGE(Misc, 1, 99);
+ R_DEFINE_ERROR_RESULT(AssertionFailed, 1);
+ R_DEFINE_ERROR_RESULT(InvalidTransform, 2);
+
+ R_DEFINE_ERROR_RANGE(Smi, 101, 199);
+ R_DEFINE_ERROR_RESULT(OutOfPushSpace, 101);
+ R_DEFINE_ERROR_RESULT(OutOfPopSpace, 102);
+ R_DEFINE_ERROR_RESULT(InvalidInHeaderMagic, 103);
+ R_DEFINE_ERROR_RESULT(InvalidOutHeaderMagic, 104);
+ R_DEFINE_ERROR_RESULT(WaitTimeout, 105);
+
+ R_DEFINE_ERROR_RANGE(SystemSf, 201, 299);
+ R_DEFINE_ERROR_RESULT(InvalidProcess, 201);
+ R_DEFINE_ERROR_RESULT(NoMessagesAvailable, 202);
+
+ R_DEFINE_ERROR_RANGE(Loader, 301, 399);
+ R_DEFINE_ERROR_RESULT(InvalidProcessType, 301);
+ R_DEFINE_ERROR_RESULT(InvalidTargetInputMagic, 302);
+ R_DEFINE_ERROR_RESULT(InvalidTargetInputSize, 303);
+
+ R_DEFINE_ERROR_RANGE(SystemSmi, 401, 499);
+ R_DEFINE_ERROR_RESULT(ApplicationActive, 401);
+ R_DEFINE_ERROR_RESULT(InvalidSelectedUser, 402);
+ R_DEFINE_ERROR_RESULT(AlreadyQueued, 403);
+ R_DEFINE_ERROR_RESULT(ApplicationNotActive, 404);
+ R_DEFINE_ERROR_RESULT(NoHomebrewTakeoverApplication, 405);
+
+ R_DEFINE_ERROR_RANGE(Util, 501, 599);
+ R_DEFINE_ERROR_RESULT(InvalidJson, 501);
+
+ R_DEFINE_ERROR_RANGE(Menu, 601, 699);
+ R_DEFINE_ERROR_RESULT(RomfsNotFound, 601);
+
+}
diff --git a/libs/uCommon/include/ul/util/util_Results.hpp b/libs/uCommon/include/ul/util/util_Results.hpp
deleted file mode 100644
index 8d3735d..0000000
--- a/libs/uCommon/include/ul/util/util_Results.hpp
+++ /dev/null
@@ -1,11 +0,0 @@
-
-#pragma once
-#include
-
-namespace ul::util {
-
- UL_RC_DEFINE_SUBMODULE(5);
-
- UL_RC_DEFINE(InvalidJson, 1);
-
-}
\ No newline at end of file
diff --git a/libs/uCommon/include/ul/util/util_String.hpp b/libs/uCommon/include/ul/util/util_String.hpp
index 9bbb2b2..e1971a5 100644
--- a/libs/uCommon/include/ul/util/util_String.hpp
+++ b/libs/uCommon/include/ul/util/util_String.hpp
@@ -41,6 +41,5 @@ namespace ul::util {
std::string FormatAccount(const AccountUid value);
std::string FormatResultDisplay(const Result rc);
- std::string FormatResultHex(const Result rc);
}
\ No newline at end of file
diff --git a/libs/uCommon/source/ul/util/util_Json.cpp b/libs/uCommon/source/ul/util/util_Json.cpp
index 319aca8..9b419c4 100644
--- a/libs/uCommon/source/ul/util/util_Json.cpp
+++ b/libs/uCommon/source/ul/util/util_Json.cpp
@@ -1,6 +1,6 @@
#include
#include
-#include
+#include
namespace ul::util {
diff --git a/libs/uCommon/source/ul/util/util_String.cpp b/libs/uCommon/source/ul/util/util_String.cpp
index 6d59438..e522332 100644
--- a/libs/uCommon/source/ul/util/util_String.cpp
+++ b/libs/uCommon/source/ul/util/util_String.cpp
@@ -1,4 +1,5 @@
#include
+#include
namespace ul::util {
@@ -37,14 +38,17 @@ namespace ul::util {
}
std::string FormatResultDisplay(const Result rc) {
- char res[0x20] = {};
- sprintf(res, "%04d-%04d", R_MODULE(rc) + 2000, R_DESCRIPTION(rc));
- return res;
- }
+ char res[0x40] = {};
- std::string FormatResultHex(const Result rc) {
- char res[0x20] = {};
- sprintf(res, "0x%X", rc);
+ const char *mod_name;
+ const char *rc_name;
+ if(rc::GetResultNameAny(rc, mod_name, rc_name)) {
+ sprintf(res, "%04d-%04d/0x%X/%s::%s", R_MODULE(rc) + 2000, R_DESCRIPTION(rc), R_VALUE(rc), mod_name, rc_name);
+ }
+ else {
+ sprintf(res, "%04d-%04d/0x%X", R_MODULE(rc) + 2000, R_DESCRIPTION(rc), R_VALUE(rc));
+ }
+
return res;
}
diff --git a/projects/uLoader/include/ul/loader/loader_Results.hpp b/projects/uLoader/include/ul/loader/loader_Results.hpp
deleted file mode 100644
index 526fa23..0000000
--- a/projects/uLoader/include/ul/loader/loader_Results.hpp
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#pragma once
-#include
-
-namespace ul::loader {
-
- UL_RC_DEFINE_SUBMODULE(3);
-
- UL_RC_DEFINE(InvalidProcessType, 1);
- UL_RC_DEFINE(InvalidTargetInputMagic, 2);
- UL_RC_DEFINE(InvalidTargetInputSize, 3);
-
-}
\ No newline at end of file
diff --git a/projects/uLoader/source/ul/loader/loader_Input.cpp b/projects/uLoader/source/ul/loader/loader_Input.cpp
index 62bc601..d5fedf7 100644
--- a/projects/uLoader/source/ul/loader/loader_Input.cpp
+++ b/projects/uLoader/source/ul/loader/loader_Input.cpp
@@ -1,6 +1,5 @@
#include
#include
-#include
#include
#include
#include
diff --git a/projects/uManager/uManager.jpg b/projects/uManager/uManager.jpg
index c874c08..064fdca 100644
Binary files a/projects/uManager/uManager.jpg and b/projects/uManager/uManager.jpg differ
diff --git a/projects/uMenu/include/ul/menu/menu_Results.hpp b/projects/uMenu/include/ul/menu/menu_Results.hpp
deleted file mode 100644
index ddf42c8..0000000
--- a/projects/uMenu/include/ul/menu/menu_Results.hpp
+++ /dev/null
@@ -1,11 +0,0 @@
-
-#pragma once
-#include
-
-namespace ul::menu {
-
- UL_RC_DEFINE_SUBMODULE(6);
-
- UL_RC_DEFINE(RomfsNotFound, 1);
-
-}
\ No newline at end of file
diff --git a/projects/uMenu/romfs/default/ui/Cursor.png b/projects/uMenu/romfs/default/ui/Cursor.png
index ae915ae..5f3c46a 100644
Binary files a/projects/uMenu/romfs/default/ui/Cursor.png and b/projects/uMenu/romfs/default/ui/Cursor.png differ
diff --git a/projects/uMenu/source/main.cpp b/projects/uMenu/source/main.cpp
index 967eaad..86643e0 100644
--- a/projects/uMenu/source/main.cpp
+++ b/projects/uMenu/source/main.cpp
@@ -7,7 +7,6 @@
#include
#include
#include
-#include
using namespace ul::util::size;
@@ -79,7 +78,7 @@ int main() {
// Check if our RomFs data exists...
if(!ul::fs::ExistsFile(RomfsFile)) {
- UL_RC_ASSERT(ul::menu::ResultRomfsNotFound);
+ UL_RC_ASSERT(ul::ResultRomfsNotFound);
}
// Try to mount it
diff --git a/projects/uMenu/source/ul/menu/ui/ui_IMenuLayout.cpp b/projects/uMenu/source/ul/menu/ui/ui_IMenuLayout.cpp
index bf554ea..03b5f86 100644
--- a/projects/uMenu/source/ul/menu/ui/ui_IMenuLayout.cpp
+++ b/projects/uMenu/source/ul/menu/ui/ui_IMenuLayout.cpp
@@ -26,7 +26,7 @@ namespace ul::menu::ui {
}
case smi::MenuMessage::GameCardMountFailure: {
// TODO: move somewhere else?
- g_MenuApplication->DisplayDialog(GetLanguageString("gamecard"), GetLanguageString("gamecard_mount_failed") + " " + util::FormatResultHex(first_msg.gc_mount_failure.mount_rc), { GetLanguageString("ok") }, true);
+ g_MenuApplication->DisplayDialog(GetLanguageString("gamecard"), GetLanguageString("gamecard_mount_failed") + " " + util::FormatResultDisplay(first_msg.gc_mount_failure.mount_rc), { GetLanguageString("ok") }, true);
this->msg_queue.pop();
break;
}
diff --git a/projects/uSystem/include/ul/system/sf/sf_IPrivateService.hpp b/projects/uSystem/include/ul/system/sf/sf_IPrivateService.hpp
index 00c515b..b9f81bf 100644
--- a/projects/uSystem/include/ul/system/sf/sf_IPrivateService.hpp
+++ b/projects/uSystem/include/ul/system/sf/sf_IPrivateService.hpp
@@ -5,15 +5,15 @@
namespace ul::system::sf {
- struct MenuMessageContext : ams::sf::LargeData, ams::sf::PrefersMapAliasTransferMode {
+ struct MenuMessageContext : ::ams::sf::LargeData, ::ams::sf::PrefersMapAliasTransferMode {
smi::MenuMessageContext actual_ctx;
};
}
#define UL_SYSTEM_SF_I_PRIVATE_SERVICE_INTERFACE_INFO(C, H) \
- AMS_SF_METHOD_INFO(C, H, 0, Result, Initialize, (const ams::sf::ClientProcessId &client_pid), (client_pid)) \
- AMS_SF_METHOD_INFO(C, H, 1, Result, TryPopMessageContext, (ams::sf::Out<::ul::system::sf::MenuMessageContext> out_msg), (out_msg))
+ AMS_SF_METHOD_INFO(C, H, 0, Result, Initialize, (const ::ams::sf::ClientProcessId &client_pid), (client_pid)) \
+ AMS_SF_METHOD_INFO(C, H, 1, Result, TryPopMessageContext, (::ams::sf::Out<::ul::system::sf::MenuMessageContext> out_msg), (out_msg))
AMS_SF_DEFINE_INTERFACE(ams::ul::system::sf, IPrivateService, UL_SYSTEM_SF_I_PRIVATE_SERVICE_INTERFACE_INFO, 0xCAFEBABE)
@@ -26,9 +26,9 @@ namespace ul::system::sf {
public:
PrivateService() : initialized(false) {}
- ams::Result Initialize(const ams::sf::ClientProcessId &client_pid);
- ams::Result TryPopMessageContext(ams::sf::Out out_msg);
+ ::ams::Result Initialize(const ::ams::sf::ClientProcessId &client_pid);
+ ::ams::Result TryPopMessageContext(::ams::sf::Out out_msg);
};
- static_assert(ams::ul::system::sf::IsIPrivateService);
+ static_assert(::ams::ul::system::sf::IsIPrivateService);
}
\ No newline at end of file
diff --git a/projects/uSystem/include/ul/system/sf/sf_IpcManager.hpp b/projects/uSystem/include/ul/system/sf/sf_IpcManager.hpp
index cbb1b7a..8772b83 100644
--- a/projects/uSystem/include/ul/system/sf/sf_IpcManager.hpp
+++ b/projects/uSystem/include/ul/system/sf/sf_IpcManager.hpp
@@ -7,8 +7,8 @@ namespace ul::system::sf {
// Note: domains and pointer buffer are required since ECS sessions will make use of them (like normal fs interfaces)
- using Allocator = ams::sf::ExpHeapAllocator;
- using ObjectFactory = ams::sf::ObjectFactory;
+ using Allocator = ::ams::sf::ExpHeapAllocator;
+ using ObjectFactory = ::ams::sf::ObjectFactory<::ams::sf::ExpHeapAllocator::Policy>;
struct ServerOptions {
static constexpr size_t PointerBufferSize = 0x800;
@@ -26,25 +26,25 @@ namespace ul::system::sf {
};
constexpr size_t MaxPrivateSessions = 1;
- constexpr ams::sm::ServiceName PrivateServiceName = ams::sm::ServiceName::Encode(ul::sf::PrivateServiceName);
+ constexpr ::ams::sm::ServiceName PrivateServiceName = ::ams::sm::ServiceName::Encode(ul::sf::PrivateServiceName);
/*
constexpr size_t MaxPublicSessions = 0x20;
- constexpr ams::sm::ServiceName PublicServiceName = ams::sm::ServiceName::Encode(ul::sf::PublicServiceName);
+ constexpr ::ams::sm::ServiceName PublicServiceName = ::ams::sm::ServiceName::Encode(ul::sf::PublicServiceName);
*/
constexpr size_t MaxEcsExtraSessions = 5;
constexpr size_t MaxSessions = MaxPrivateSessions + MaxEcsExtraSessions;
- class ServerManager final : public ams::sf::hipc::ServerManager {
+ class ServerManager final : public ::ams::sf::hipc::ServerManager {
private:
- virtual ams::Result OnNeedsToAccept(int port_index, Server *server) override;
+ virtual ::ams::Result OnNeedsToAccept(int port_index, Server *server) override;
};
Result Initialize();
Allocator &GetManagerAllocator();
- ams::Result RegisterSession(const ams::os::NativeHandle session_handle, ams::sf::cmif::ServiceObjectHolder &&obj);
+ ::ams::Result RegisterSession(const ::ams::os::NativeHandle session_handle, ::ams::sf::cmif::ServiceObjectHolder &&obj);
template
inline auto MakeShared(Args ...args) {
diff --git a/projects/uSystem/include/ul/system/sf/sf_Results.hpp b/projects/uSystem/include/ul/system/sf/sf_Results.hpp
deleted file mode 100644
index 276150d..0000000
--- a/projects/uSystem/include/ul/system/sf/sf_Results.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#pragma once
-#include
-
-namespace ul::system::sf {
-
- UL_RC_DEFINE_SUBMODULE(2);
-
- UL_RC_DEFINE(InvalidProcess, 1);
- UL_RC_DEFINE(NoMessagesAvailable, 2);
-
-}
\ No newline at end of file
diff --git a/projects/uSystem/include/ul/system/smi/smi_Results.hpp b/projects/uSystem/include/ul/system/smi/smi_Results.hpp
deleted file mode 100644
index 338361b..0000000
--- a/projects/uSystem/include/ul/system/smi/smi_Results.hpp
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#pragma once
-#include
-
-namespace ul::system::smi {
-
- UL_RC_DEFINE_SUBMODULE(4);
-
- UL_RC_DEFINE(ApplicationActive, 1);
- UL_RC_DEFINE(InvalidSelectedUser, 2);
- UL_RC_DEFINE(AlreadyQueued, 3);
- UL_RC_DEFINE(ApplicationNotActive, 4);
- UL_RC_DEFINE(NoHomebrewTakeoverApplication, 5);
-
-}
\ No newline at end of file
diff --git a/projects/uSystem/include/ul/system/smi/smi_SystemProtocol.hpp b/projects/uSystem/include/ul/system/smi/smi_SystemProtocol.hpp
index a247f92..b18997b 100644
--- a/projects/uSystem/include/ul/system/smi/smi_SystemProtocol.hpp
+++ b/projects/uSystem/include/ul/system/smi/smi_SystemProtocol.hpp
@@ -1,7 +1,6 @@
#pragma once
#include
-#include
namespace ul::system::smi {
diff --git a/projects/uSystem/source/main.cpp b/projects/uSystem/source/main.cpp
index 48fa96c..48c5267 100644
--- a/projects/uSystem/source/main.cpp
+++ b/projects/uSystem/source/main.cpp
@@ -340,13 +340,13 @@ namespace {
UL_RC_TRY(reader.Pop(launch_app_id));
if(app::IsActive()) {
- return smi::ResultApplicationActive;
+ return ul::ResultApplicationActive;
}
if(!accountUidIsValid(&g_SelectedUser)) {
- return smi::ResultInvalidSelectedUser;
+ return ul::ResultInvalidSelectedUser;
}
if(g_ApplicationLaunchFlag > 0) {
- return smi::ResultAlreadyQueued;
+ return ul::ResultAlreadyQueued;
}
g_ApplicationLaunchFlag = launch_app_id;
@@ -354,7 +354,7 @@ namespace {
}
case ul::smi::SystemMessage::ResumeApplication: {
if(!app::IsActive()) {
- return smi::ResultApplicationNotActive;
+ return ul::ResultApplicationNotActive;
}
UL_RC_TRY(app::SetForeground());
@@ -374,19 +374,19 @@ namespace {
UL_RC_TRY(reader.Pop(temp_ipt));
if(app::IsActive()) {
- return smi::ResultApplicationActive;
+ return ul::ResultApplicationActive;
}
if(!accountUidIsValid(&g_SelectedUser)) {
- return smi::ResultInvalidSelectedUser;
+ return ul::ResultInvalidSelectedUser;
}
if(g_ApplicationLaunchFlag > 0) {
- return smi::ResultAlreadyQueued;
+ return ul::ResultAlreadyQueued;
}
u64 hb_application_takeover_program_id;
UL_ASSERT_TRUE(g_Config.GetEntry(ul::cfg::ConfigEntryId::HomebrewApplicationTakeoverApplicationId, hb_application_takeover_program_id));
if(hb_application_takeover_program_id == 0) {
- return smi::ResultNoHomebrewTakeoverApplication;
+ return ul::ResultNoHomebrewTakeoverApplication;
}
g_LoaderApplicationLaunchFlag = temp_ipt;
diff --git a/projects/uSystem/source/ul/system/ecs/ecs_ExternalContent.cpp b/projects/uSystem/source/ul/system/ecs/ecs_ExternalContent.cpp
index cf1fd27..d5ab907 100644
--- a/projects/uSystem/source/ul/system/ecs/ecs_ExternalContent.cpp
+++ b/projects/uSystem/source/ul/system/ecs/ecs_ExternalContent.cpp
@@ -21,15 +21,15 @@ namespace ul::system::ecs {
FsFileSystem sd_fs;
UL_RC_TRY(fsOpenSdCardFileSystem(&sd_fs));
- std::shared_ptr remote_sd_fs = std::make_shared(sd_fs);
- auto subdir_fs = std::make_shared(std::move(remote_sd_fs));
- ams::fs::Path exefs_fs_path;
+ std::shared_ptr<::ams::fs::fsa::IFileSystem> remote_sd_fs = std::make_shared<::ams::fs::RemoteFileSystem>(sd_fs);
+ auto subdir_fs = std::make_shared<::ams::fssystem::SubDirectoryFileSystem>(std::move(remote_sd_fs));
+ ::ams::fs::Path exefs_fs_path;
UL_RC_TRY(exefs_fs_path.Initialize(exefs_path.c_str(), exefs_path.length()));
- UL_RC_TRY(exefs_fs_path.Normalize(ams::fs::PathFlags{}));
+ UL_RC_TRY(exefs_fs_path.Normalize(::ams::fs::PathFlags{}));
UL_RC_TRY(subdir_fs->Initialize(exefs_fs_path));
- auto sd_ifs_ipc = sf::MakeShared(std::move(subdir_fs), false);
- UL_RC_TRY(sf::RegisterSession(move_h, ams::sf::cmif::ServiceObjectHolder(std::move(sd_ifs_ipc))));
+ auto sd_ifs_ipc = sf::MakeShared<::ams::fssrv::sf::IFileSystem, ::ams::fssrv::impl::FileSystemInterfaceAdapter>(std::move(subdir_fs), false);
+ UL_RC_TRY(sf::RegisterSession(move_h, ::ams::sf::cmif::ServiceObjectHolder(std::move(sd_ifs_ipc))));
return ResultSuccess;
}
diff --git a/projects/uSystem/source/ul/system/sf/sf_IPrivateService.cpp b/projects/uSystem/source/ul/system/sf/sf_IPrivateService.cpp
index ee4ea01..65e4302 100644
--- a/projects/uSystem/source/ul/system/sf/sf_IPrivateService.cpp
+++ b/projects/uSystem/source/ul/system/sf/sf_IPrivateService.cpp
@@ -1,5 +1,4 @@
#include
-#include
#include
#include
@@ -8,7 +7,7 @@ extern std::queue *g_MenuMessageQueue;
namespace ul::system::sf {
- ams::Result PrivateService::Initialize(const ams::sf::ClientProcessId &client_pid) {
+ ::ams::Result PrivateService::Initialize(const ::ams::sf::ClientProcessId &client_pid) {
if(!this->initialized) {
u64 program_id = 0;
UL_RC_TRY(pminfoInitialize());
@@ -28,7 +27,7 @@ namespace ul::system::sf {
return ResultSuccess;
}
- ams::Result PrivateService::TryPopMessageContext(ams::sf::Out out_msg_ctx) {
+ ::ams::Result PrivateService::TryPopMessageContext(::ams::sf::Out out_msg_ctx) {
if(!this->initialized) {
return ResultInvalidProcess;
}
diff --git a/projects/uSystem/source/ul/system/sf/sf_IpcManager.cpp b/projects/uSystem/source/ul/system/sf/sf_IpcManager.cpp
index b18779d..d36eb12 100644
--- a/projects/uSystem/source/ul/system/sf/sf_IpcManager.cpp
+++ b/projects/uSystem/source/ul/system/sf/sf_IpcManager.cpp
@@ -37,10 +37,10 @@ namespace {
namespace ul::system::sf {
- ams::Result ServerManager::OnNeedsToAccept(int port_index, Server *server) {
+ ::ams::Result ServerManager::OnNeedsToAccept(int port_index, Server *server) {
switch(port_index) {
case Port_PrivateService: {
- return this->AcceptImpl(server, MakeShared());
+ return this->AcceptImpl(server, MakeShared<::ams::ul::system::sf::IPrivateService, PrivateService>());
}
AMS_UNREACHABLE_DEFAULT_CASE();
}
@@ -48,8 +48,8 @@ namespace ul::system::sf {
Result Initialize() {
InitializeHeap();
- UL_RC_TRY(ams::os::CreateThread(&g_ManagerThread, &IpcManagerThread, nullptr, g_ManagerThreadStack, sizeof(g_ManagerThreadStack), 10));
- ams::os::StartThread(&g_ManagerThread);
+ UL_RC_TRY(::ams::os::CreateThread(&g_ManagerThread, &IpcManagerThread, nullptr, g_ManagerThreadStack, sizeof(g_ManagerThreadStack), 10));
+ ::ams::os::StartThread(&g_ManagerThread);
return ResultSuccess;
}
@@ -59,7 +59,7 @@ namespace ul::system::sf {
return g_ManagerAllocator;
}
- ams::Result RegisterSession(const ams::os::NativeHandle session_handle, ams::sf::cmif::ServiceObjectHolder &&obj) {
+ ::ams::Result RegisterSession(const ::ams::os::NativeHandle session_handle, ::ams::sf::cmif::ServiceObjectHolder &&obj) {
return g_Manager.RegisterSession(session_handle, std::move(obj));
}