fix: crashes on regions not USA
This commit is contained in:
parent
410ae150e1
commit
0cfd8c2f5b
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -7,11 +7,10 @@ namespace Ryujinx.HLE.HOS.SystemState
|
||||
USA,
|
||||
Europe,
|
||||
Australia,
|
||||
HongKongTaiwanKorea,
|
||||
China,
|
||||
Korea,
|
||||
Taiwan,
|
||||
|
||||
Min = Japan,
|
||||
Max = Taiwan,
|
||||
Max = China,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user