Don't force the aspect ratio in GameINIs

Instead, add a SuggestedAspectRatio option which tells Dolphin which
aspect ratio to use when the aspect ratio option is set to Auto.
This commit is contained in:
Léo Lam 2017-08-02 16:30:34 +08:00
parent 8ee5253c5b
commit e58ba76f07
37 changed files with 42 additions and 34 deletions

View file

@ -11,5 +11,5 @@ EmulationIssues =
[Video] [Video]
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0

View file

@ -9,5 +9,5 @@ EmulationIssues =
EmulationStateId = 4 EmulationStateId = 4
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0

View file

@ -9,7 +9,7 @@ EmulationIssues = Texture filtering will cause glitches.
EmulationStateId = 4 EmulationStateId = 4
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0
[Video_Hacks] [Video_Hacks]

View file

@ -9,5 +9,5 @@ EmulationIssues =
EmulationStateId = 4 EmulationStateId = 4
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0

View file

@ -9,7 +9,7 @@ EmulationStateId = 4
EmulationIssues = EmulationIssues =
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0
UseXFB = True UseXFB = True
UseRealXFB = True UseRealXFB = True

View file

@ -9,5 +9,5 @@ EmulationIssues =
EmulationStateId = 4 EmulationStateId = 4
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0

View file

@ -1,4 +1,4 @@
# Nxxxxx - All Nintendo 64 Virtual Console games # Nxxxxx - All Nintendo 64 Virtual Console games
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -12,5 +12,5 @@ EmulationIssues =
[Video] [Video]
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0

View file

@ -8,5 +8,5 @@ EmulationIssues =
[Video] [Video]
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0

View file

@ -18,5 +18,5 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 0 SafeTextureCacheColorSamples = 0

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,5 +18,5 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512

View file

@ -18,5 +18,5 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,5 +18,5 @@ EmulationStateId = 5
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2
SafeTextureCacheColorSamples = 512 SafeTextureCacheColorSamples = 512

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -21,4 +21,4 @@ EmulationIssues =
EFBEmulateFormatChanges = True EFBEmulateFormatChanges = True
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -19,4 +19,4 @@ EmulationIssues = Needs Synchronise GPU thread for stability. Use direct3d11 for
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -21,4 +21,4 @@ EmulationIssues =
EFBEmulateFormatChanges = True EFBEmulateFormatChanges = True
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -18,4 +18,4 @@ EmulationIssues =
# Add action replay cheats here. # Add action replay cheats here.
[Video_Settings] [Video_Settings]
AspectRatio = 2 SuggestedAspectRatio = 2

View file

@ -23,6 +23,8 @@ const ConfigInfo<int> GFX_ADAPTER{{System::GFX, "Hardware", "Adapter"}, 0};
const ConfigInfo<bool> GFX_WIDESCREEN_HACK{{System::GFX, "Settings", "wideScreenHack"}, false}; const ConfigInfo<bool> GFX_WIDESCREEN_HACK{{System::GFX, "Settings", "wideScreenHack"}, false};
const ConfigInfo<int> GFX_ASPECT_RATIO{{System::GFX, "Settings", "AspectRatio"}, const ConfigInfo<int> GFX_ASPECT_RATIO{{System::GFX, "Settings", "AspectRatio"},
static_cast<int>(ASPECT_AUTO)}; static_cast<int>(ASPECT_AUTO)};
const ConfigInfo<int> GFX_SUGGESTED_ASPECT_RATIO{{System::GFX, "Settings", "SuggestedAspectRatio"},
static_cast<int>(ASPECT_AUTO)};
const ConfigInfo<bool> GFX_CROP{{System::GFX, "Settings", "Crop"}, false}; const ConfigInfo<bool> GFX_CROP{{System::GFX, "Settings", "Crop"}, false};
const ConfigInfo<bool> GFX_USE_XFB{{System::GFX, "Settings", "UseXFB"}, false}; const ConfigInfo<bool> GFX_USE_XFB{{System::GFX, "Settings", "UseXFB"}, false};
const ConfigInfo<bool> GFX_USE_REAL_XFB{{System::GFX, "Settings", "UseRealXFB"}, false}; const ConfigInfo<bool> GFX_USE_REAL_XFB{{System::GFX, "Settings", "UseRealXFB"}, false};

View file

@ -21,6 +21,7 @@ extern const ConfigInfo<int> GFX_ADAPTER;
extern const ConfigInfo<bool> GFX_WIDESCREEN_HACK; extern const ConfigInfo<bool> GFX_WIDESCREEN_HACK;
extern const ConfigInfo<int> GFX_ASPECT_RATIO; extern const ConfigInfo<int> GFX_ASPECT_RATIO;
extern const ConfigInfo<int> GFX_SUGGESTED_ASPECT_RATIO;
extern const ConfigInfo<bool> GFX_CROP; extern const ConfigInfo<bool> GFX_CROP;
extern const ConfigInfo<bool> GFX_USE_XFB; extern const ConfigInfo<bool> GFX_USE_XFB;
extern const ConfigInfo<bool> GFX_USE_REAL_XFB; extern const ConfigInfo<bool> GFX_USE_REAL_XFB;

View file

@ -71,6 +71,7 @@ static const INIToLocationMap& GetINIToLocationMap()
{{"Video_Settings", "wideScreenHack"}, {Config::GFX_WIDESCREEN_HACK.location}}, {{"Video_Settings", "wideScreenHack"}, {Config::GFX_WIDESCREEN_HACK.location}},
{{"Video_Settings", "AspectRatio"}, {Config::GFX_ASPECT_RATIO.location}}, {{"Video_Settings", "AspectRatio"}, {Config::GFX_ASPECT_RATIO.location}},
{{"Video_Settings", "SuggestedAspectRatio"}, {Config::GFX_SUGGESTED_ASPECT_RATIO.location}},
{{"Video_Settings", "Crop"}, {Config::GFX_CROP.location}}, {{"Video_Settings", "Crop"}, {Config::GFX_CROP.location}},
{{"Video_Settings", "UseXFB"}, {Config::GFX_USE_XFB.location}}, {{"Video_Settings", "UseXFB"}, {Config::GFX_USE_XFB.location}},
{{"Video_Settings", "UseRealXFB"}, {Config::GFX_USE_REAL_XFB.location}}, {{"Video_Settings", "UseRealXFB"}, {Config::GFX_USE_REAL_XFB.location}},

View file

@ -56,7 +56,11 @@ void VideoConfig::Refresh()
iAdapter = Config::Get(Config::GFX_ADAPTER); iAdapter = Config::Get(Config::GFX_ADAPTER);
bWidescreenHack = Config::Get(Config::GFX_WIDESCREEN_HACK); bWidescreenHack = Config::Get(Config::GFX_WIDESCREEN_HACK);
iAspectRatio = Config::Get(Config::GFX_ASPECT_RATIO); const int aspect_ratio = Config::Get(Config::GFX_ASPECT_RATIO);
if (aspect_ratio == ASPECT_AUTO)
iAspectRatio = Config::Get(Config::GFX_SUGGESTED_ASPECT_RATIO);
else
iAspectRatio = aspect_ratio;
bCrop = Config::Get(Config::GFX_CROP); bCrop = Config::Get(Config::GFX_CROP);
bUseXFB = Config::Get(Config::GFX_USE_XFB); bUseXFB = Config::Get(Config::GFX_USE_XFB);
bUseRealXFB = Config::Get(Config::GFX_USE_REAL_XFB); bUseRealXFB = Config::Get(Config::GFX_USE_REAL_XFB);