HLE: Use a member variable instead of a virtual function to retrieve the max number of sessions that can be connected to an HLE service at the same time.

This commit is contained in:
Subv 2016-12-05 13:44:41 -05:00
parent 00f0c77570
commit 61a2fe8c3b
5 changed files with 18 additions and 8 deletions

View file

@ -14,6 +14,8 @@ class Interface;
namespace APT {
static const u32 MaxAPTSessions = 2; ///< Each APT service can only have up to 2 sessions connected at the same time.
/// Holds information about the parameters used in Send/Glance/ReceiveParameter
struct MessageParameter {
u32 sender_id = 0;

View file

@ -39,7 +39,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x01020000, CheckNew3DS, "CheckNew3DS"},
};
APT_A_Interface::APT_A_Interface() {
APT_A_Interface::APT_A_Interface() : Interface(MaxAPTSessions) {
Register(FunctionTable);
}

View file

@ -99,7 +99,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x01020000, CheckNew3DS, "CheckNew3DS"},
};
APT_S_Interface::APT_S_Interface() {
APT_S_Interface::APT_S_Interface() : Interface(MaxAPTSessions) {
Register(FunctionTable);
}

View file

@ -99,7 +99,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x01020000, CheckNew3DS, "CheckNew3DS"},
};
APT_U_Interface::APT_U_Interface() {
APT_U_Interface::APT_U_Interface() : Interface(MaxAPTSessions) {
Register(FunctionTable);
}