New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback Region Option #9254
Fallback Region Option #9254
Conversation
If we're going to have a setting for this, the setting should be checked before checking the region of the system menu, as the region of the system menu is rather annoying to change. It would be simpler if we used the I personally don't think it makes sense to have both "override" and "fallback" in the name. It's either an override or a fallback, not both. The way it's implemented, I would not call it an override, as it has no effect for games with a known region. |
I can certainly do that.
I tried that at first, didn't work immediately, went with strings for the POC. I definitely plan to look into this more.
That's fair I suppose. I named it as such because it overrides the default fallback of forcing PAL if no other method exists to find one. (not identifiable from the running title, no System Menu installed) I'll try to get some of this done soon. |
Hm, maybe "fallback override" does actually make sense if it overrides the system menu check... I would appreciate if someone else could weigh in on this. |
The fallback override should now take precedence over the current installed Wii System Menu. It also uses the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, maybe "fallback override" does actually make sense if it overrides the system menu check... I would appreciate if someone else could weigh in on this.
I agree with this reasoning. However, I'm not sure most users know what fallback it's overriding, or even that the system menu region is used as a fallback... Removing the "override" wouldn't be a good solution because it is technically an override and you can disable the override, so I think what we should do is add an explanation in the UI.
Source/Core/Core/ConfigManager.cpp
Outdated
@@ -246,6 +246,7 @@ void SConfig::SaveCoreSettings(IniFile& ini) | |||
core->Set("PerfMapDir", m_perfDir); | |||
core->Set("EnableCustomRTC", bEnableCustomRTC); | |||
core->Set("CustomRTCValue", m_customRTCValue); | |||
core->Set("FallbackRegionOverride", m_fallback_region_override); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core->Set("FallbackRegionOverride", m_fallback_region_override); |
Source/Core/Core/ConfigManager.cpp
Outdated
@@ -514,6 +515,7 @@ void SConfig::LoadCoreSettings(IniFile& ini) | |||
core->Get("EnableCustomRTC", &bEnableCustomRTC, false); | |||
// Default to seconds between 1.1.1970 and 1.1.2000 | |||
core->Get("CustomRTCValue", &m_customRTCValue, 946684800); | |||
core->Get("FallbackRegionOverride", &m_fallback_region_override, DiscIO::Region::Unknown); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core->Get("FallbackRegionOverride", &m_fallback_region_override, DiscIO::Region::Unknown); |
Source/Core/Core/ConfigManager.h
Outdated
@@ -308,6 +308,9 @@ struct SConfig | |||
std::string m_auto_update_track; | |||
std::string m_auto_update_hash_override; | |||
|
|||
// Fallback Region Override setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three lines should be removed: instead, you should add it to the list in Core/ConfigLoaders/IsSettingSaveable.cpp (and then use Config::SetBase / Config::Get to interact with the setting)
Source/Core/DolphinQt/Settings.cpp
Outdated
if (region == GetFallbackRegionOverride()) | ||
return; | ||
|
||
SConfig::GetInstance().m_fallback_region_override = region; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use Config::SetBase (as mentioned above)
Source/Core/DolphinQt/Settings.cpp
Outdated
|
||
DiscIO::Region Settings::GetFallbackRegionOverride() const | ||
{ | ||
return SConfig::GetInstance().m_fallback_region_override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config::Get
Source/Core/Core/ConfigManager.cpp
Outdated
@@ -929,6 +931,13 @@ bool SConfig::SetPathsAndGameMetadata(const BootParameters& boot) | |||
|
|||
DiscIO::Region SConfig::GetFallbackRegion() | |||
{ | |||
// Fall back to the override option if set | |||
const DiscIO::Region fallback = SConfig::GetInstance().m_fallback_region_override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this one, but this should use Config::Get as well, of course.
How does this work for an explanation as a QLabel under the form row?
I'm certainly not a wordsmith, so am up for changing it any way it is needed. |
I'd remove the first sentence as vertical space is at a premium in the setting windows:
|
#include <DiscIO/Enums.h> | ||
#include <string> | ||
|
||
#include "Common/Config/Config.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <DiscIO/Enums.h> | |
#include <string> | |
#include "Common/Config/Config.h" | |
#include <string> | |
#include "Common/Config/Config.h" | |
#include "DiscIO/Enums.h" |
Source/Core/Core/ConfigManager.cpp
Outdated
@@ -11,6 +11,7 @@ | |||
#include <sstream> | |||
#include <variant> | |||
|
|||
#include <Core/Config/MainSettings.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. (Place the include below #include "Common/Config/Config.h"
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, #include "name"
for Dolphin headers, not #include <name>
.
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
33e732c
to
db5aec0
Compare
A user-selected fallback to use instead of the default PAL
This can be used for unknown region or region free titles to give them the ability to force a different region than the current fallback region of PAL. This can be useful if a user is trying to play a region free title 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.
This is primarily a proof-of-concept in its current stage.