xenia
xenia copied to clipboard
[App/UI/Kernel] Add console region setting and locale menu
This adds a console region setting to the XConfig section of the Xenia config file and changes the behavior of xeXGetGameRegion, allowing for things like region-specific startup screens and language options to be available in games, such as the RIOT ACT title screen in Crackdown (4D5307DC) and the Piracy Warning and Japanese-specific title screen in Sonic Generations (53450848). It also enables use of the Japanese dub in Ace Combat 6 (not confirmed by me) and while Xenia master cannot currently load them, it also enables correct function of the language packs for Resident Evil 6.
Also adds a menu to the Xenia window for configuring the user language, user country and console region settings without having to manually edit the config file and typing in values. The menu checkmark code is a bit... strange, but the comment in window_win.cc explains why it currently looks the way it does. (This menu is disabled while a title is running.)
While Crackdown currently crashes on Xenia master due to an incorrect return code when loading a saved game, here are some example screenshots:

The menu selection for those settings is not a good idea unless you can confirm the Xbox 360 can change those settings while the game is running.
Ah no, it technically can not change those settings while a game is running, since that requires launching the settings application part of the dashboard. But you're saying that the menu can't just be disabled while a title is running?
Edit: Sorry, I realize now that I forgot to copy the latest emulator_window.cc to the PR directory before committing, there's also a typo left in xam_info.cc that I fixed but also forgot to copy. I'll get those in there right away.
Ah no, it technically can not change those settings while a game is running, since that requires launching the settings application part of the dashboard. But you're saying that the menu can't just be disabled while a title is running?
Edit: Sorry, I realize now that I forgot to copy the latest
emulator_window.ccto the PR directory before committing, there's also a typo left inxam_info.ccthat I fixed but also forgot to copy. I'll get those in there right away.
No worries, if you disable changing the settings via the menu when a game is running that should be fine.
I realized that there was another LaunchPath call hiding out in xenia_main.cc, so I felt the need to rework disabling the console locale menu a little bit.
I had actually forgotten to copy files again after editing them... I really should stop doing my coding out of the current git tree, it's just that it's such a giant pain to have GitAhead sit around and eat 100% on one thread every single time a file is modified in the tree, even if it's excluded by .gitignore. :D Really sorry about that, the last commit is now actually using the correct and up to date files. It's just a minor change and a typo in a log message, but still...
After a few hours of contemplation, realizing how I managed to get the entire thing backwards and being unable to figure out how to use already existing data in the code base to approach this problem, I'm going to close the pull request. If anyone that understands octects and whatnots wants to make a proper implementation, please refer to the unresolved conversation between myself and @NicknineTheEagle in this PR.