From d70ed99fb1bfc5b2e50ccb776e0c31e656b27110 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Wed, 13 Jun 2018 15:08:11 +0200 Subject: [PATCH 1/3] Implement GetAvailableLanguageCodes2 with a method --- .../OsHle/Services/Set/ISettingsServer.cs | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs b/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs index 96297ad2b1..172dc3ea97 100644 --- a/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs +++ b/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs @@ -15,7 +15,8 @@ namespace Ryujinx.HLE.OsHle.Services.Set { { 0, GetLanguageCode }, { 1, GetAvailableLanguageCodes }, - { 3, GetAvailableLanguageCodeCount } + { 3, GetAvailableLanguageCodeCount }, + { 5, GetAvailableLanguageCodes2 } }; } @@ -27,10 +28,28 @@ 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) @@ -46,15 +65,8 @@ namespace Ryujinx.HLE.OsHle.Services.Set } Context.ResponseData.Write(Count); - - return 0; - } - - public static long GetAvailableLanguageCodeCount(ServiceCtx Context) - { - Context.ResponseData.Write(SystemStateMgr.LanguageCodes.Length); - - return 0; - } + + return 0; + } } -} \ No newline at end of file +} From 940de631ab12f1f0161ab0174bd46cc6025369f1 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Wed, 13 Jun 2018 15:12:03 +0200 Subject: [PATCH 2/3] correct whitespaces --- .../OsHle/Services/Set/ISettingsServer.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs b/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs index 172dc3ea97..02d483b282 100644 --- a/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs +++ b/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs @@ -29,9 +29,9 @@ namespace Ryujinx.HLE.OsHle.Services.Set public static long GetAvailableLanguageCodes(ServiceCtx Context) { - GetAvailableLanguagesCodesMethod(Context.Request.RecvListBuff[0].Position, Context.Request.RecvListBuff[0].Size, Context); + GetAvailableLanguagesCodesMethod(Context.Request.RecvListBuff[0].Position, Context.Request.RecvListBuff[0].Size, Context); - return 0; + return 0; } public static long GetAvailableLanguageCodeCount(ServiceCtx Context) @@ -43,13 +43,13 @@ namespace Ryujinx.HLE.OsHle.Services.Set public static long GetAvailableLanguageCodes2(ServiceCtx Context) { - GetAvailableLanguagesCodesMethod(Context.Request.ReceiveBuff[0].Position, Context.Request.ReceiveBuff[0].Size, Context); + GetAvailableLanguagesCodesMethod(Context.Request.ReceiveBuff[0].Position, Context.Request.ReceiveBuff[0].Size, Context); - return 0; + return 0; } - public static long GetAvailableLanguagesCodesMethod(long Position, long Size, ServiceCtx Context) - { + public static long GetAvailableLanguagesCodesMethod(long Position, long Size, ServiceCtx Context) + { int Count = (int)(Size / 8); if (Count > SystemStateMgr.LanguageCodes.Length) @@ -66,7 +66,7 @@ namespace Ryujinx.HLE.OsHle.Services.Set Context.ResponseData.Write(Count); - return 0; - } + return 0; + } } } From 644a328b88c8bb82d0f86e97f5d678edc36258ed Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Wed, 13 Jun 2018 17:38:19 +0200 Subject: [PATCH 3/3] change places of the args of GetAvailableLanguagesCodesMethod --- Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs b/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs index 02d483b282..abab938221 100644 --- a/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs +++ b/Ryujinx.HLE/OsHle/Services/Set/ISettingsServer.cs @@ -29,7 +29,7 @@ namespace Ryujinx.HLE.OsHle.Services.Set public static long GetAvailableLanguageCodes(ServiceCtx Context) { - GetAvailableLanguagesCodesMethod(Context.Request.RecvListBuff[0].Position, Context.Request.RecvListBuff[0].Size, Context); + GetAvailableLanguagesCodesMethod(Context, Context.Request.RecvListBuff[0].Position, Context.Request.RecvListBuff[0].Size); return 0; } @@ -43,12 +43,12 @@ namespace Ryujinx.HLE.OsHle.Services.Set public static long GetAvailableLanguageCodes2(ServiceCtx Context) { - GetAvailableLanguagesCodesMethod(Context.Request.ReceiveBuff[0].Position, Context.Request.ReceiveBuff[0].Size, Context); + GetAvailableLanguagesCodesMethod(Context, Context.Request.ReceiveBuff[0].Position, Context.Request.ReceiveBuff[0].Size); return 0; } - public static long GetAvailableLanguagesCodesMethod(long Position, long Size, ServiceCtx Context) + public static long GetAvailableLanguagesCodesMethod(ServiceCtx Context, long Position, long Size) { int Count = (int)(Size / 8);