diff --git a/Makefile b/Makefile index 7ae7d77..93eddcb 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ TARGETS := mcmitm_version.cpp mc_mitm all: $(TARGETS) mcmitm_version.cpp: .git/HEAD .git/index - echo "namespace ams::mitm { unsigned int mc_version = $(VERSION); const char *mc_build_name = \"$(BUILD_VERSION)\"; const char *mc_build_date = \"$(BUILD_DATE)\"; }" > mc_mitm/source/$@ + echo "namespace ams::mc { unsigned int mc_version = $(VERSION); const char *mc_build_name = \"$(BUILD_VERSION)\"; const char *mc_build_date = \"$(BUILD_DATE)\"; }" > mc_mitm/source/$@ mc_mitm: $(MAKE) -C $@ diff --git a/mc_mitm/source/mc/mc_module.cpp b/mc_mitm/source/mc/mc_module.cpp index bb9fb33..05f24bd 100644 --- a/mc_mitm/source/mc/mc_module.cpp +++ b/mc_mitm/source/mc/mc_module.cpp @@ -16,7 +16,7 @@ #include "mc_module.hpp" #include "mc_service.hpp" -namespace ams::mitm::mc { +namespace ams::mc { namespace { @@ -60,8 +60,8 @@ namespace ams::mitm::mc { } - Result Launch() { - R_TRY(os::CreateThread(&g_thread, + void Launch() { + R_ABORT_UNLESS(os::CreateThread(&g_thread, MissionControlThreadFunction, nullptr, g_thread_stack, @@ -71,8 +71,6 @@ namespace ams::mitm::mc { os::SetThreadNamePointer(&g_thread, "mc::MissionControlThread"); os::StartThread(&g_thread); - - R_SUCCEED(); } void WaitFinished() { diff --git a/mc_mitm/source/mc/mc_module.hpp b/mc_mitm/source/mc/mc_module.hpp index b3e4e98..3ef8218 100644 --- a/mc_mitm/source/mc/mc_module.hpp +++ b/mc_mitm/source/mc/mc_module.hpp @@ -16,9 +16,9 @@ #pragma once #include -namespace ams::mitm::mc { +namespace ams::mc { - Result Launch(); + void Launch(); void WaitFinished(); } diff --git a/mc_mitm/source/mc/mc_service.cpp b/mc_mitm/source/mc/mc_service.cpp index dc99448..82deab1 100644 --- a/mc_mitm/source/mc/mc_service.cpp +++ b/mc_mitm/source/mc/mc_service.cpp @@ -16,7 +16,7 @@ #include "mc_service.hpp" #include "../mcmitm_version.hpp" -namespace ams::mitm::mc { +namespace ams::mc { Result MissionControlService::GetVersion(sf::Out version) { version.SetValue(mc_version); @@ -28,7 +28,7 @@ namespace ams::mitm::mc { R_SUCCEED(); } - Result MissionControlService::GetBuildDateString(sf::Out date) { + Result MissionControlService::GetBuildDateString(sf::Out date) { std::strncpy(date.GetPointer()->date, mc_build_date, sizeof(mc::DateString)); R_SUCCEED(); } diff --git a/mc_mitm/source/mc/mc_service.hpp b/mc_mitm/source/mc/mc_service.hpp index fbcc5ce..5bc426a 100644 --- a/mc_mitm/source/mc/mc_service.hpp +++ b/mc_mitm/source/mc/mc_service.hpp @@ -20,20 +20,20 @@ #define AMS_MISSION_CONTROL_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO(C, H, 0, Result, GetVersion, (sf::Out version), (version)) \ - AMS_SF_METHOD_INFO(C, H, 1, Result, GetBuildVersionString, (sf::Out version), (version)) \ - AMS_SF_METHOD_INFO(C, H, 2, Result, GetBuildDateString, (sf::Out version), (version)) \ + AMS_SF_METHOD_INFO(C, H, 1, Result, GetBuildVersionString, (sf::Out version), (version)) \ + AMS_SF_METHOD_INFO(C, H, 2, Result, GetBuildDateString, (sf::Out version), (version)) \ -AMS_SF_DEFINE_INTERFACE(ams::mitm::mc, IMissionControlInterface, AMS_MISSION_CONTROL_INTERFACE_INFO, 0x30eba3d4) +AMS_SF_DEFINE_INTERFACE(ams::mc, IMissionControlInterface, AMS_MISSION_CONTROL_INTERFACE_INFO, 0x30eba3d4) -namespace ams::mitm::mc { +namespace ams::mc { class MissionControlService { private: public: Result GetVersion(sf::Out version); - Result GetBuildVersionString(sf::Out version); - Result GetBuildDateString(sf::Out date); + Result GetBuildVersionString(sf::Out version); + Result GetBuildDateString(sf::Out date); }; static_assert(IsIMissionControlInterface); diff --git a/mc_mitm/source/mc/mc_types.hpp b/mc_mitm/source/mc/mc_types.hpp index 80e033b..82bac7e 100644 --- a/mc_mitm/source/mc/mc_types.hpp +++ b/mc_mitm/source/mc/mc_types.hpp @@ -15,7 +15,7 @@ */ #pragma once -namespace ams::mitm::mc { +namespace ams::mc { struct VersionString { char version[32]; diff --git a/mc_mitm/source/mcmitm_version.hpp b/mc_mitm/source/mcmitm_version.hpp index c9cb676..ed10fbf 100644 --- a/mc_mitm/source/mcmitm_version.hpp +++ b/mc_mitm/source/mcmitm_version.hpp @@ -15,7 +15,7 @@ */ #pragma once -namespace ams::mitm { +namespace ams::mc { extern const unsigned int mc_version; extern const char *mc_build_name;