Fix Implementations 2
This commit is contained in:
parent
34392dd30d
commit
55c8bdb842
1 changed files with 22 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
||||||
using Ryujinx.Core.OsHle.Ipc;
|
using Ryujinx.Core.OsHle.Ipc;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace Ryujinx.Core.OsHle.Services.Set
|
namespace Ryujinx.Core.OsHle.Services.Set
|
||||||
{
|
{
|
||||||
|
@ -34,7 +36,7 @@ namespace Ryujinx.Core.OsHle.Services.Set
|
||||||
{
|
{
|
||||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||||
{
|
{
|
||||||
{ 0, GetLanguageCode },
|
{ 0, GetLanguageCode },
|
||||||
{ 1, GetAvailableLanguageCodes },
|
{ 1, GetAvailableLanguageCodes },
|
||||||
{ 3, GetAvailableLanguageCodeCount }
|
{ 3, GetAvailableLanguageCodeCount }
|
||||||
};
|
};
|
||||||
|
@ -42,11 +44,29 @@ namespace Ryujinx.Core.OsHle.Services.Set
|
||||||
|
|
||||||
public static long GetLanguageCode(ServiceCtx Context)
|
public static long GetLanguageCode(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
Context.ResponseData.Write(1L); //en-US
|
Context.ResponseData.Write(LanguageCodetoLongBE(LanguageCodes[1]));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static long LanguageCodetoLongBE(string LanguageCode)
|
||||||
|
{
|
||||||
|
using (MemoryStream MS = new MemoryStream())
|
||||||
|
{
|
||||||
|
foreach (char Chr in LanguageCode)
|
||||||
|
{
|
||||||
|
MS.WriteByte((byte)Chr);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int Offs = 0; Offs < (8 - LanguageCode.Length); Offs++)
|
||||||
|
{
|
||||||
|
MS.WriteByte(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return BitConverter.ToInt64(MS.ToArray(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static long GetAvailableLanguageCodes(ServiceCtx Context)
|
public static long GetAvailableLanguageCodes(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long Position = Context.Request.RecvListBuff[0].Position;
|
long Position = Context.Request.RecvListBuff[0].Position;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue