mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 00:28:51 -04:00
htc: implement socket driver (socket api not really impl'd yet)
This commit is contained in:
parent
b5ab491603
commit
1c974a387c
31 changed files with 1389 additions and 35 deletions
|
@ -200,6 +200,10 @@ namespace ams::htc {
|
|||
return htclow::impl::DriverType::HostBridge;
|
||||
} else if (std::strstr(transport, "plainchannel")) {
|
||||
return htclow::impl::DriverType::PlainChannel;
|
||||
} else if (std::strstr(transport, "socket")) {
|
||||
/* NOTE: Nintendo does not actually allow socket driver to be selected. */
|
||||
/* Should we disallow this? Undesirable, because people will want to use docked tma. */
|
||||
return htclow::impl::DriverType::Socket;
|
||||
} else {
|
||||
return DefaultHtclowDriverType;
|
||||
}
|
||||
|
@ -230,6 +234,12 @@ namespace ams::htc {
|
|||
|
||||
}
|
||||
|
||||
namespace ams::htclow::driver {
|
||||
|
||||
void InitializeSocketApiForSocketDriver();
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
/* Set thread name. */
|
||||
|
@ -240,6 +250,11 @@ int main(int argc, char **argv)
|
|||
const auto driver_type = htc::GetHtclowDriverType();
|
||||
htclow::HtclowManagerHolder::SetDefaultDriver(driver_type);
|
||||
|
||||
/* If necessary, initialize the socket driver. */
|
||||
if (driver_type == htclow::impl::DriverType::Socket) {
|
||||
htclow::driver::InitializeSocketApiForSocketDriver();
|
||||
}
|
||||
|
||||
/* Initialize the htclow manager. */
|
||||
htclow::HtclowManagerHolder::AddReference();
|
||||
ON_SCOPE_EXIT { htclow::HtclowManagerHolder::Release(); };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue