Add Fallback Region to configuration menu
Fallback Region A user-selected fallback to use instead of the default PAL This is used for unknown region or region free titles to give them the ability to force region to use. This replaces the current fallback region of PAL. This can be useful if a user is trying to play a region free tilte that is originally NTSC and expects to be run at NTSC speeds. This may be done when a user attempts to dump a WAD of their own without understanding the settings they have chosen, or could be an intentional decision by a developer of a ROM hack that can be injected into a Virtual Console WAD. Remove using System Menu region being checked in GetFallbackRegion Use DiscIO::Region instead of std::String for fallback Add explanation text for Fallback Region
This commit is contained in:
8 files changed
+112
-13
No files matched your search
@@ -12,6 +12,7 @@
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/SI/SI_Device.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
|
||||
namespace Config
|
||||
@@ -106,6 +107,8 @@ const Info<std::string> MAIN_PERF_MAP_DIR{{System::Main, "Core", "PerfMapDir"},
|
||||
const Info<bool> MAIN_CUSTOM_RTC_ENABLE{{System::Main, "Core", "EnableCustomRTC"}, false};
|
||||
// Default to seconds between 1.1.1970 and 1.1.2000
|
||||
const Info<u32> MAIN_CUSTOM_RTC_VALUE{{System::Main, "Core", "CustomRTCValue"}, 946684800};
|
||||
const Info<DiscIO::Region> MAIN_FALLBACK_REGION{{System::Main, "Core", "FallbackRegion"},
|
||||
DiscIO::Region::NTSC_J};
|
||||
const Info<bool> MAIN_AUTO_DISC_CHANGE{{System::Main, "Core", "AutoDiscChange"}, false};
|
||||
const Info<bool> MAIN_ALLOW_SD_WRITES{{System::Main, "Core", "WiiSDCardAllowWrites"}, true};
|
||||
const Info<bool> MAIN_ENABLE_SAVESTATES{{System::Main, "Core", "EnableSaveStates"}, false};
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "Common/Config/Config.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
|
||||
namespace PowerPC
|
||||
{
|
||||
@@ -88,6 +89,7 @@ extern const Info<u32> MAIN_CUSTOM_RTC_VALUE;
|
||||
extern const Info<bool> MAIN_AUTO_DISC_CHANGE;
|
||||
extern const Info<bool> MAIN_ALLOW_SD_WRITES;
|
||||
extern const Info<bool> MAIN_ENABLE_SAVESTATES;
|
||||
extern const Info<DiscIO::Region> MAIN_FALLBACK_REGION;
|
||||
|
||||
// Main.DSP
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ bool IsSettingSaveable(const Config::Location& config_location)
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr std::array<const Config::Location*, 16> s_setting_saveable = {
|
||||
static constexpr std::array<const Config::Location*, 17> s_setting_saveable = {
|
||||
// Main.Core
|
||||
|
||||
&Config::MAIN_DEFAULT_ISO.location,
|
||||
@@ -48,6 +48,7 @@ bool IsSettingSaveable(const Config::Location& config_location)
|
||||
&Config::MAIN_MEM2_SIZE.location,
|
||||
&Config::MAIN_GFX_BACKEND.location,
|
||||
&Config::MAIN_ENABLE_SAVESTATES.location,
|
||||
&Config::MAIN_FALLBACK_REGION.location,
|
||||
|
||||
// Main.Interface
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "Core/Analytics.h"
|
||||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/CommonTitles.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/Config/SYSCONFSettings.h"
|
||||
#include "Core/ConfigLoaders/GameConfigLoader.h"
|
||||
#include "Core/Core.h"
|
||||
@@ -929,18 +930,7 @@ bool SConfig::SetPathsAndGameMetadata(const BootParameters& boot)
|
||||
|
||||
DiscIO::Region SConfig::GetFallbackRegion()
|
||||
{
|
||||
// Fall back to the system menu region, if possible.
|
||||
IOS::HLE::Kernel ios;
|
||||
const IOS::ES::TMDReader system_menu_tmd = ios.GetES()->FindInstalledTMD(Titles::SYSTEM_MENU);
|
||||
if (system_menu_tmd.IsValid())
|
||||
{
|
||||
const DiscIO::Region region = system_menu_tmd.GetRegion();
|
||||
if (region != DiscIO::Region::Unknown)
|
||||
return region;
|
||||
}
|
||||
|
||||
// Fall back to PAL.
|
||||
return DiscIO::Region::PAL;
|
||||
return Config::Get(Config::MAIN_FALLBACK_REGION);
|
||||
}
|
||||
|
||||
DiscIO::Language SConfig::GetCurrentLanguage(bool wii) const
|
||||
|
||||
Reference in new issue
Block a user