fix: crashes on regions not USA

This commit is contained in:
Jacobwasbeast 2025-02-19 17:30:54 -06:00
parent 410ae150e1
commit 0cfd8c2f5b
4 changed files with 6 additions and 21 deletions

View File

@ -231,21 +231,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Lib
public ResultCode GetMainAppletApplicationDesiredLanguage(ServiceCtx context)
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
// TODO: Find a better method to get the desired language.
string language = "en-US";
switch (context.Device.Configuration.Region)
{
case RegionCode.Japan:
language = "ja";
break;
case RegionCode.Europe:
language = "fr";
break;
case RegionCode.Korea:
language = "ko";
break;
}
context.ResponseData.Write(language);
context.ResponseData.Write(context.Device.System.State.DesiredLanguageCode);
return ResultCode.Success;
}

View File

@ -52,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
// GetApplicationDesiredLanguage() -> u32
public ResultCode GetApplicationDesiredLanguage(ServiceCtx context)
{
context.ResponseData.Write((uint)context.Device.Configuration.Region);
context.ResponseData.Write((uint)context.Device.System.State.DesiredLanguageCode);
return ResultCode.Success;
}
}

View File

@ -128,11 +128,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
{
return ResultCode.NullEULAVersionBuffer;
}
var eulaVersion = new EulaVersion
{
Version = 0x10000,
RegionCode = 1,
RegionCode = context.Device.System.State.DesiredRegionCode,
ClockType = 1,
NetworkSystemClock = 0,
SteadyClock = new Time.Clock.SteadyClockTimePoint {

View File

@ -7,11 +7,10 @@ namespace Ryujinx.HLE.HOS.SystemState
USA,
Europe,
Australia,
HongKongTaiwanKorea,
China,
Korea,
Taiwan,
Min = Japan,
Max = Taiwan,
Max = China,
}
}