Improvements to audout (#58)

* Some audout refactoring and improvements

* More audio improvements

* Change ReadAsciiString to use long for the Size, avoids some casting
This commit is contained in:
gdkchan 2018-03-15 21:06:24 -03:00 committed by GitHub
parent 92f47d535e
commit 79a5939734
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 567 additions and 177 deletions

View file

@ -37,7 +37,25 @@ namespace Ryujinx.Core.OsHle
{
lock (Services)
{
if (!Services.TryGetValue(Name, out IIpcService Service))
string LookUpName;
//Same service with different privileges.
if (Name.EndsWith(":a") ||
Name.EndsWith(":m") ||
Name.EndsWith(":s") ||
Name.EndsWith(":su") ||
Name.EndsWith(":u") ||
Name.EndsWith(":u0") ||
Name.EndsWith(":u1"))
{
LookUpName = Name.Substring(0, Name.IndexOf(':'));
}
else
{
LookUpName = Name;
}
if (!Services.TryGetValue(LookUpName, out IIpcService Service))
{
switch (Name)
{
@ -76,7 +94,7 @@ namespace Ryujinx.Core.OsHle
throw new NotImplementedException(Name);
}
Services.Add(Name, Service);
Services.Add(LookUpName, Service);
}
return Service;