Implement GetAvailableLanguageCodes2 with a method
This commit is contained in:
parent
f1e866e248
commit
d70ed99fb1
1 changed files with 27 additions and 15 deletions
|
@ -15,7 +15,8 @@ namespace Ryujinx.HLE.OsHle.Services.Set
|
|||
{
|
||||
{ 0, GetLanguageCode },
|
||||
{ 1, GetAvailableLanguageCodes },
|
||||
{ 3, GetAvailableLanguageCodeCount }
|
||||
{ 3, GetAvailableLanguageCodeCount },
|
||||
{ 5, GetAvailableLanguageCodes2 }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -28,9 +29,27 @@ namespace Ryujinx.HLE.OsHle.Services.Set
|
|||
|
||||
public static long GetAvailableLanguageCodes(ServiceCtx Context)
|
||||
{
|
||||
long Position = Context.Request.RecvListBuff[0].Position;
|
||||
long Size = Context.Request.RecvListBuff[0].Size;
|
||||
GetAvailableLanguagesCodesMethod(Context.Request.RecvListBuff[0].Position, Context.Request.RecvListBuff[0].Size, Context);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long GetAvailableLanguageCodeCount(ServiceCtx Context)
|
||||
{
|
||||
Context.ResponseData.Write(SystemStateMgr.LanguageCodes.Length);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long GetAvailableLanguageCodes2(ServiceCtx Context)
|
||||
{
|
||||
GetAvailableLanguagesCodesMethod(Context.Request.ReceiveBuff[0].Position, Context.Request.ReceiveBuff[0].Size, Context);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long GetAvailableLanguagesCodesMethod(long Position, long Size, ServiceCtx Context)
|
||||
{
|
||||
int Count = (int)(Size / 8);
|
||||
|
||||
if (Count > SystemStateMgr.LanguageCodes.Length)
|
||||
|
@ -49,12 +68,5 @@ namespace Ryujinx.HLE.OsHle.Services.Set
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long GetAvailableLanguageCodeCount(ServiceCtx Context)
|
||||
{
|
||||
Context.ResponseData.Write(SystemStateMgr.LanguageCodes.Length);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue