mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-29 17:46:05 +00:00
Merge pull request #160 from greggameplayer/patch-7
Implement GetAvailableLanguageCodes2 with a method
This commit is contained in:
commit
e581abb2f5
|
@ -15,7 +15,8 @@ namespace Ryujinx.HLE.OsHle.Services.Set
|
||||||
{
|
{
|
||||||
{ 0, GetLanguageCode },
|
{ 0, GetLanguageCode },
|
||||||
{ 1, GetAvailableLanguageCodes },
|
{ 1, GetAvailableLanguageCodes },
|
||||||
{ 3, GetAvailableLanguageCodeCount }
|
{ 3, GetAvailableLanguageCodeCount },
|
||||||
|
{ 5, GetAvailableLanguageCodes2 }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,10 +28,28 @@ namespace Ryujinx.HLE.OsHle.Services.Set
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long GetAvailableLanguageCodes(ServiceCtx Context)
|
public static long GetAvailableLanguageCodes(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long Position = Context.Request.RecvListBuff[0].Position;
|
GetAvailableLanguagesCodesMethod(Context, Context.Request.RecvListBuff[0].Position, Context.Request.RecvListBuff[0].Size);
|
||||||
long Size = Context.Request.RecvListBuff[0].Size;
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long GetAvailableLanguageCodeCount(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
Context.ResponseData.Write(SystemStateMgr.LanguageCodes.Length);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long GetAvailableLanguageCodes2(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
GetAvailableLanguagesCodesMethod(Context, Context.Request.ReceiveBuff[0].Position, Context.Request.ReceiveBuff[0].Size);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long GetAvailableLanguagesCodesMethod(ServiceCtx Context, long Position, long Size)
|
||||||
|
{
|
||||||
int Count = (int)(Size / 8);
|
int Count = (int)(Size / 8);
|
||||||
|
|
||||||
if (Count > SystemStateMgr.LanguageCodes.Length)
|
if (Count > SystemStateMgr.LanguageCodes.Length)
|
||||||
|
@ -46,15 +65,8 @@ namespace Ryujinx.HLE.OsHle.Services.Set
|
||||||
}
|
}
|
||||||
|
|
||||||
Context.ResponseData.Write(Count);
|
Context.ResponseData.Write(Count);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long GetAvailableLanguageCodeCount(ServiceCtx Context)
|
|
||||||
{
|
|
||||||
Context.ResponseData.Write(SystemStateMgr.LanguageCodes.Length);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue