mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-15 13:22:15 +02:00
Fixed compilation against master
This commit is contained in:
parent
453c2f3309
commit
9b21262085
@ -15,8 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <cstring>
|
#include <vapours/common.hpp>
|
||||||
#include <switch.h>
|
#include <vapours/assert.hpp>
|
||||||
|
|
||||||
namespace ams::util {
|
namespace ams::util {
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace ams::lr {
|
|||||||
|
|
||||||
std::shared_ptr<ncm::IContentStorage> content_storage;
|
std::shared_ptr<ncm::IContentStorage> content_storage;
|
||||||
R_TRY(ncm::impl::OpenContentStorage(&content_storage, storage_id));
|
R_TRY(ncm::impl::OpenContentStorage(&content_storage, storage_id));
|
||||||
R_ASSERT(content_storage->GetPath(out.GetPointer(), data_content_id));
|
R_ABORT_UNLESS(content_storage->GetPath(out.GetPointer(), data_content_id));
|
||||||
|
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ namespace ams::lr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ContentLocationResolverInterface::GetContentStoragePath(Path* out, ncm::ContentId content_id) {
|
void ContentLocationResolverInterface::GetContentStoragePath(Path* out, ncm::ContentId content_id) {
|
||||||
R_ASSERT(this->content_storage->GetPath(out, content_id));
|
R_ABORT_UNLESS(this->content_storage->GetPath(out, content_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ContentLocationResolverInterface::ResolveProgramPath(sf::Out<Path> out, ncm::ProgramId id) {
|
Result ContentLocationResolverInterface::ResolveProgramPath(sf::Out<Path> out, ncm::ProgramId id) {
|
||||||
|
@ -89,7 +89,7 @@ namespace ams::ncm {
|
|||||||
Result ContentStorageInterface::GeneratePlaceHolderId(sf::Out<PlaceHolderId> out) {
|
Result ContentStorageInterface::GeneratePlaceHolderId(sf::Out<PlaceHolderId> out) {
|
||||||
R_TRY(this->EnsureEnabled());
|
R_TRY(this->EnsureEnabled());
|
||||||
|
|
||||||
ams::rnd::GenerateRandomBytes(out.GetPointer(), sizeof(PlaceHolderId));
|
ams::os::GenerateRandomBytes(out.GetPointer(), sizeof(PlaceHolderId));
|
||||||
char placeholder_str[FS_MAX_PATH] = {0};
|
char placeholder_str[FS_MAX_PATH] = {0};
|
||||||
GetStringFromPlaceHolderId(placeholder_str, *out.GetPointer());
|
GetStringFromPlaceHolderId(placeholder_str, *out.GetPointer());
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
|
@ -73,7 +73,7 @@ void __appInit(void) {
|
|||||||
hos::SetVersionForLibnx();
|
hos::SetVersionForLibnx();
|
||||||
|
|
||||||
sm::DoWithSession([&]() {
|
sm::DoWithSession([&]() {
|
||||||
R_ASSERT(fsInitialize());
|
R_ABORT_UNLESS(fsInitialize());
|
||||||
});
|
});
|
||||||
|
|
||||||
ams::CheckApiVersion();
|
ams::CheckApiVersion();
|
||||||
@ -107,7 +107,7 @@ namespace {
|
|||||||
|
|
||||||
void ContentManagerServerMain(void* arg) {
|
void ContentManagerServerMain(void* arg) {
|
||||||
/* Create services. */
|
/* Create services. */
|
||||||
R_ASSERT(g_ncm_server_manager.RegisterServer<ncm::ContentManagerService>(NcmServiceName, NcmMaxSessions));
|
R_ABORT_UNLESS(g_ncm_server_manager.RegisterServer<ncm::ContentManagerService>(NcmServiceName, NcmMaxSessions));
|
||||||
|
|
||||||
/* Loop forever, servicing our services. */
|
/* Loop forever, servicing our services. */
|
||||||
g_ncm_server_manager.LoopProcess();
|
g_ncm_server_manager.LoopProcess();
|
||||||
@ -115,7 +115,7 @@ void ContentManagerServerMain(void* arg) {
|
|||||||
|
|
||||||
void LocationResolverServerMain(void* arg) {
|
void LocationResolverServerMain(void* arg) {
|
||||||
/* Create services. */
|
/* Create services. */
|
||||||
R_ASSERT(g_lr_server_manager.RegisterServer<lr::LocationResolverManagerService>(LrServiceName, LrMaxSessions));
|
R_ABORT_UNLESS(g_lr_server_manager.RegisterServer<lr::LocationResolverManagerService>(LrServiceName, LrMaxSessions));
|
||||||
|
|
||||||
/* Loop forever, servicing our services. */
|
/* Loop forever, servicing our services. */
|
||||||
g_lr_server_manager.LoopProcess();
|
g_lr_server_manager.LoopProcess();
|
||||||
@ -124,16 +124,16 @@ void LocationResolverServerMain(void* arg) {
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
/* Initialize content manager implementation. */
|
/* Initialize content manager implementation. */
|
||||||
R_ASSERT(ams::ncm::impl::InitializeContentManager());
|
R_ABORT_UNLESS(ams::ncm::impl::InitializeContentManager());
|
||||||
|
|
||||||
static os::Thread s_content_manager_thread;
|
static os::Thread s_content_manager_thread;
|
||||||
static os::Thread s_location_resolver_thread;
|
static os::Thread s_location_resolver_thread;
|
||||||
|
|
||||||
R_ASSERT(s_content_manager_thread.Initialize(&ContentManagerServerMain, nullptr, 0x4000, 0x15));
|
R_ABORT_UNLESS(s_content_manager_thread.Initialize(&ContentManagerServerMain, nullptr, 0x4000, 0x15));
|
||||||
R_ASSERT(s_content_manager_thread.Start());
|
R_ABORT_UNLESS(s_content_manager_thread.Start());
|
||||||
|
|
||||||
R_ASSERT(s_location_resolver_thread.Initialize(&LocationResolverServerMain, nullptr, 0x4000, 0x15));
|
R_ABORT_UNLESS(s_location_resolver_thread.Initialize(&LocationResolverServerMain, nullptr, 0x4000, 0x15));
|
||||||
R_ASSERT(s_location_resolver_thread.Start());
|
R_ABORT_UNLESS(s_location_resolver_thread.Start());
|
||||||
|
|
||||||
s_content_manager_thread.Join();
|
s_content_manager_thread.Join();
|
||||||
s_location_resolver_thread.Join();
|
s_location_resolver_thread.Join();
|
||||||
|
Loading…
Reference in New Issue
Block a user