mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-05 09:13:43 -04:00
ams: support building unit test programs on windows/linux/macos
This commit is contained in:
parent
9a38be201a
commit
64a97576d0
756 changed files with 33359 additions and 9372 deletions
|
@ -36,9 +36,12 @@ namespace ams::usb {
|
|||
/* Connect to usb:ds. */
|
||||
/* NOTE: Here, Nintendo does m_domain.InitializeByDomain<...>(...); m_domain.SetSessionCount(1); */
|
||||
{
|
||||
Service srv;
|
||||
R_TRY(sm::GetService(std::addressof(srv), sm::ServiceName::Encode("usb:ds")));
|
||||
#if defined(ATMOSPHERE_OS_HORIZON)
|
||||
os::NativeHandle h;
|
||||
R_TRY(sm::GetServiceHandle(std::addressof(h), sm::ServiceName::Encode("usb:ds")));
|
||||
|
||||
::Service srv;
|
||||
::serviceCreate(&srv, h);
|
||||
R_ABORT_UNLESS(serviceConvertToDomain(std::addressof(srv)));
|
||||
|
||||
using Allocator = decltype(m_allocator);
|
||||
|
@ -51,6 +54,9 @@ namespace ams::usb {
|
|||
} else {
|
||||
m_ds_service = ObjectFactory::CreateSharedEmplaced<ds::IDsService, RemoteDsService>(std::addressof(m_allocator), srv, std::addressof(m_allocator));
|
||||
}
|
||||
#else
|
||||
AMS_ABORT("TODO");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Bind the client process. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue