System Language can be configurable. (#535)

This commit is contained in:
WilliamWsyHK 2018-12-27 23:08:34 +08:00 committed by emmauss
parent 5d14040e66
commit 5b029ae7a2
3 changed files with 23 additions and 3 deletions

View File

@ -54,8 +54,6 @@ namespace Ryujinx.HLE.HOS.SystemState
public SystemStateMgr()
{
SetLanguage(SystemLanguage.AmericanEnglish);
SetAudioOutputAsBuiltInSpeaker();
_profiles = new ConcurrentDictionary<string, UserProfile>();
@ -71,7 +69,20 @@ namespace Ryujinx.HLE.HOS.SystemState
{
DesiredLanguageCode = GetLanguageCode((int)language);
switch (language)
{
case SystemLanguage.Taiwanese:
case SystemLanguage.TraditionalChinese:
DesiredTitleLanguage = TitleLanguage.Taiwanese;
break;
case SystemLanguage.Chinese:
case SystemLanguage.SimplifiedChinese:
DesiredTitleLanguage = TitleLanguage.Chinese;
break;
default:
DesiredTitleLanguage = Enum.Parse<TitleLanguage>(Enum.GetName(typeof(SystemLanguage), language));
break;
}
}
public void SetAudioOutputAsTv()

View File

@ -1,6 +1,7 @@
using LibHac;
using Ryujinx.Common.Logging;
using Ryujinx.HLE;
using Ryujinx.HLE.HOS.SystemState;
using Ryujinx.HLE.Input;
using Ryujinx.UI.Input;
using System;
@ -61,6 +62,10 @@ namespace Ryujinx
}
}
SystemLanguage SetLanguage = Enum.Parse<SystemLanguage>(parser.Value("System_Language"));
device.System.State.SetLanguage(SetLanguage);
device.System.State.DockedMode = Convert.ToBoolean(parser.Value("Docked_Mode"));
device.EnableDeviceVsync = Convert.ToBoolean(parser.Value("Enable_Vsync"));

View File

@ -22,6 +22,10 @@ Logging_Enable_Error = true
#Filtered log classes, seperated by ", ", eg. `Logging_Filtered_Classes = Loader, ServiceFS`
Logging_Filtered_Classes =
#System Language list: https://gist.github.com/HorrorTroll/b6e4a88d774c3c9b3bdf54d79a7ca43b
#Change System Language
System_Language = AmericanEnglish
#Enable or Disable Docked Mode
Docked_Mode = false