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) 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;
} }

View File

@ -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;
} }
} }

View File

@ -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 {

View File

@ -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,
} }
} }