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)
|
public ResultCode GetMainAppletApplicationDesiredLanguage(ServiceCtx context)
|
||||||
{
|
{
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||||
// TODO: Find a better method to get the desired language.
|
context.ResponseData.Write(context.Device.System.State.DesiredLanguageCode);
|
||||||
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);
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||||||
// GetApplicationDesiredLanguage() -> u32
|
// GetApplicationDesiredLanguage() -> u32
|
||||||
public ResultCode GetApplicationDesiredLanguage(ServiceCtx context)
|
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;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,11 +128,11 @@ namespace Ryujinx.HLE.HOS.Services.Settings
|
|||||||
{
|
{
|
||||||
return ResultCode.NullEULAVersionBuffer;
|
return ResultCode.NullEULAVersionBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
var eulaVersion = new EulaVersion
|
var eulaVersion = new EulaVersion
|
||||||
{
|
{
|
||||||
Version = 0x10000,
|
Version = 0x10000,
|
||||||
RegionCode = 1,
|
RegionCode = context.Device.System.State.DesiredRegionCode,
|
||||||
ClockType = 1,
|
ClockType = 1,
|
||||||
NetworkSystemClock = 0,
|
NetworkSystemClock = 0,
|
||||||
SteadyClock = new Time.Clock.SteadyClockTimePoint {
|
SteadyClock = new Time.Clock.SteadyClockTimePoint {
|
||||||
|
@ -7,11 +7,10 @@ namespace Ryujinx.HLE.HOS.SystemState
|
|||||||
USA,
|
USA,
|
||||||
Europe,
|
Europe,
|
||||||
Australia,
|
Australia,
|
||||||
|
HongKongTaiwanKorea,
|
||||||
China,
|
China,
|
||||||
Korea,
|
|
||||||
Taiwan,
|
|
||||||
|
|
||||||
Min = Japan,
|
Min = Japan,
|
||||||
Max = Taiwan,
|
Max = China,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user