Implement GetRegionCode and add the RegionCode to settings (#999)
This implement `GetRegionCode` accordingly to RE. I've added a setting in the GUI and a field in the Configuration file with a way to update the Configuration file if needed.
This commit is contained in:
parent
561d64e5bf
commit
32d3f3f690
12 changed files with 156 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"version": 2,
|
||||
"graphics_shaders_dump_path": "",
|
||||
"logging_enable_debug": false,
|
||||
"logging_enable_stub": true,
|
||||
|
@ -11,6 +11,7 @@
|
|||
"logging_filtered_classes": [],
|
||||
"enable_file_log": true,
|
||||
"system_language": "AmericanEnglish",
|
||||
"system_region": "USA",
|
||||
"docked_mode": false,
|
||||
"enable_discord_integration": true,
|
||||
"enable_vsync": true,
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Ryujinx
|
|||
|
||||
ConfigurationFileFormat configurationFileFormat = ConfigurationFileFormat.Load(localConfigurationPath);
|
||||
|
||||
ConfigurationState.Instance.Load(configurationFileFormat);
|
||||
ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
|
||||
}
|
||||
else if (File.Exists(globalConfigurationPath))
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ namespace Ryujinx
|
|||
|
||||
ConfigurationFileFormat configurationFileFormat = ConfigurationFileFormat.Load(globalConfigurationPath);
|
||||
|
||||
ConfigurationState.Instance.Load(configurationFileFormat);
|
||||
ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace Ryujinx.Ui
|
|||
[GUI] CheckButton _ignoreToggle;
|
||||
[GUI] CheckButton _directKeyboardAccess;
|
||||
[GUI] ComboBoxText _systemLanguageSelect;
|
||||
[GUI] ComboBoxText _systemRegionSelect;
|
||||
[GUI] CheckButton _custThemeToggle;
|
||||
[GUI] Entry _custThemePath;
|
||||
[GUI] ToggleButton _browseThemePath;
|
||||
|
@ -197,6 +198,7 @@ namespace Ryujinx.Ui
|
|||
}
|
||||
|
||||
_systemLanguageSelect.SetActiveId(ConfigurationState.Instance.System.Language.Value.ToString());
|
||||
_systemRegionSelect .SetActiveId(ConfigurationState.Instance.System.Region.Value.ToString());
|
||||
_controller1Type .SetActiveId(ConfigurationState.Instance.Hid.ControllerType.Value.ToString());
|
||||
Controller_Changed(null, null, _controller1Type.ActiveId, _controller1Image);
|
||||
|
||||
|
@ -232,6 +234,7 @@ namespace Ryujinx.Ui
|
|||
_gameDirsBox.AppendColumn("", new CellRendererText(), "text", 0);
|
||||
_gameDirsBoxStore = new ListStore(typeof(string));
|
||||
_gameDirsBox.Model = _gameDirsBoxStore;
|
||||
|
||||
foreach (string gameDir in ConfigurationState.Instance.Ui.GameDirs.Value)
|
||||
{
|
||||
_gameDirsBoxStore.AppendValues(gameDir);
|
||||
|
@ -438,6 +441,7 @@ namespace Ryujinx.Ui
|
|||
};
|
||||
|
||||
ConfigurationState.Instance.System.Language.Value = (Language)Enum.Parse(typeof(Language), _systemLanguageSelect.ActiveId);
|
||||
ConfigurationState.Instance.System.Region.Value = (Configuration.System.Region)Enum.Parse(typeof(Configuration.System.Region), _systemRegionSelect.ActiveId);
|
||||
ConfigurationState.Instance.Hid.ControllerType.Value = (ControllerType)Enum.Parse(typeof(ControllerType), _controller1Type.ActiveId);
|
||||
ConfigurationState.Instance.Ui.CustomThemePath.Value = _custThemePath.Buffer.Text;
|
||||
ConfigurationState.Instance.Graphics.ShadersDumpPath.Value = _graphicsShadersDumpPath.Buffer.Text;
|
||||
|
|
|
@ -166,6 +166,43 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Change System Region</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="label" translatable="yes">System Region:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="padding">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="_systemRegionSelect">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Change System Region</property>
|
||||
<property name="margin_left">5</property>
|
||||
<items>
|
||||
<item id="Japan" translatable="yes">Japan</item>
|
||||
<item id="USA" translatable="yes">USA</item>
|
||||
<item id="Europe" translatable="yes">Europe</item>
|
||||
<item id="Australia" translatable="yes">Australia</item>
|
||||
<item id="China" translatable="yes">China</item>
|
||||
<item id="Korea" translatable="yes">Korea</item>
|
||||
<item id="Taiwan" translatable="yes">Taiwan</item>
|
||||
</items>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
"logging_filtered_classes",
|
||||
"enable_file_log",
|
||||
"system_language",
|
||||
"system_region",
|
||||
"docked_mode",
|
||||
"enable_vsync",
|
||||
"enable_multicore_scheduling",
|
||||
|
@ -402,6 +403,25 @@
|
|||
"AmericanEnglish"
|
||||
]
|
||||
},
|
||||
"system_region": {
|
||||
"$id": "#/properties/system_region",
|
||||
"type": "string",
|
||||
"title": "System Region",
|
||||
"description": "Change System Region",
|
||||
"default": "USA",
|
||||
"enum": [
|
||||
"Japan",
|
||||
"USA",
|
||||
"Europe",
|
||||
"Australia",
|
||||
"China",
|
||||
"Korea",
|
||||
"Taiwan"
|
||||
],
|
||||
"examples": [
|
||||
"USA"
|
||||
]
|
||||
},
|
||||
"docked_mode": {
|
||||
"$id": "#/properties/docked_mode",
|
||||
"type": "boolean",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue