Skip to content
Permalink
Browse files
Merge pull request #5744 from JosJuice/remove-non-integer-irs
Remove non-integer IRs
  • Loading branch information
leoetlino committed Aug 10, 2017
2 parents d0304c9 + 1fc910b commit e41a990
Show file tree
Hide file tree
Showing 44 changed files with 162 additions and 270 deletions.
@@ -18,7 +18,6 @@ EmulationIssues =
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 512

[Video_Enhancements]
@@ -21,8 +21,5 @@ EmulationIssues = Needs Efb to Ram for BBox (proper graphics).
EFBToTextureEnable = False
BBoxEnable = True

[Video_Settings]
EFBScale = -1

[Video_Stereoscopy]
StereoConvergence = 545
@@ -17,8 +17,5 @@ EmulationIssues =
[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

[Video_Stereoscopy]
StereoConvergence = 64
@@ -6,7 +6,7 @@
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
EmulationIssues = If EFB scale is not integral, serious texture glitches occur.
EmulationIssues =

[OnLoad]
# Add memory patches to be loaded once on boot here.
@@ -18,7 +18,4 @@ EmulationIssues = If EFB scale is not integral, serious texture glitches occur.
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

SafeTextureCacheColorSamples = 0

@@ -21,4 +21,3 @@ EmulationIssues =
UseXFB = True
UseRealXFB = False
SafeTextureCacheColorSamples = 512
EFBScale = -1
@@ -7,7 +7,7 @@ FPRF = True
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
EmulationIssues = EFB must be an integer (integral, 1x, 2x, 3x).
EmulationIssues =

[OnLoad]
# Add memory patches to be loaded once on boot here.
@@ -19,8 +19,6 @@ EmulationIssues = EFB must be an integer (integral, 1x, 2x, 3x).
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

SafeTextureCacheColorSamples = 512

[Video_Hacks]
@@ -16,7 +16,3 @@ EmulationIssues =

[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

@@ -7,7 +7,7 @@ SyncGPU = True
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
EmulationIssues = HLE music fades in and out. If EFB scale is not integral, 1x, 2x or 3x serious texture glitches occur
EmulationIssues =

[OnLoad]
# Add memory patches to be loaded once on boot here.
@@ -19,5 +19,4 @@ EmulationIssues = HLE music fades in and out. If EFB scale is not integral, 1x,
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 0
@@ -19,7 +19,6 @@ EmulationIssues =

[Video_Settings]
SafeTextureCacheColorSamples = 512
EFBScale = -1

[Video_Enhancements]
ForceFiltering = False
@@ -6,7 +6,7 @@
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
EmulationIssues = Needs integral scaling for the black lines to disappear.
EmulationIssues =

[OnLoad]
# Add memory patches to be loaded once on boot here.
@@ -18,6 +18,4 @@ EmulationIssues = Needs integral scaling for the black lines to disappear.
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 512

@@ -18,5 +18,4 @@ EmulationIssues = Jerky videos need safe cache.
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 512
@@ -16,7 +16,3 @@ EmulationIssues =

[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

@@ -17,9 +17,6 @@ EmulationIssues = USB Microphone not emulated
[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

[Video_Enhancements]
MaxAnisotropy = 0
ForceFiltering = False
@@ -21,7 +21,6 @@ EmulationIssues =
UseXFB = True
UseRealXFB = False
SafeTextureCacheColorSamples = 0
EFBScale = -1

[Video_Hacks]
EFBToTextureEnable = False
@@ -5,8 +5,8 @@

[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationIssues = Skip any errors at startup and use integral efb scale.
EmulationStateId = 4
EmulationIssues =

[OnLoad]
# Add memory patches to be loaded once on boot here.
@@ -18,6 +18,4 @@ EmulationStateId = 4
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 512

@@ -18,7 +18,6 @@ EmulationIssues =
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 512

[Video_Enhancements]
@@ -21,7 +21,6 @@ EmulationIssues =
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 512

[Video_Enhancements]
@@ -17,9 +17,6 @@ EmulationIssues =
[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

[Video_Enhancements]
MaxAnisotropy = 0
ForceFiltering = False
@@ -18,7 +18,6 @@ EmulationIssues = Enable progressive scan if the game has boot issues.
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 0

[Video_Enhancements]
@@ -18,6 +18,5 @@ EmulationIssues = Enable progressive scan if the game has boot issues.
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 0

@@ -18,7 +18,6 @@ EmulationIssues =
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 512

[Video_Enhancements]
@@ -21,7 +21,6 @@ EmulationIssues =
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1
SafeTextureCacheColorSamples = 512

[Video_Enhancements]
@@ -17,9 +17,6 @@ EmulationIssues =
[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

[Video_Enhancements]
MaxAnisotropy = 0
ForceFiltering = False
@@ -17,9 +17,6 @@ EmulationIssues =
[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

[Video_Enhancements]
MaxAnisotropy = 0
ForceFiltering = False
@@ -17,9 +17,6 @@ EmulationStateId = 5
[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
EFBScale = -1

[Video_Hacks]
EFBAccessEnable = False

@@ -20,7 +20,5 @@ EmulationIssues =
[Video_Settings]
UseXFB = True
UseRealXFB = False
EFBScale = -1

SafeTextureCacheColorSamples = 512

@@ -20,7 +20,4 @@ EmulationIssues =
[Video_Settings]
UseXFB = True
UseRealXFB = False

SafeTextureCacheColorSamples = 512
EFBScale = -1

@@ -104,19 +104,15 @@
<!-- Internal Resolution Preference -->
<string-array name="internalResolutionEntries" translatable="false">
<item>1x Native (640x528)</item>
<item>1.5x Native (960x792)</item>
<item>2x Native (1280x1056) for 720p</item>
<item>2.5x Native (1600x1320)</item>
<item>3x Native (1920x1584) for 1080p</item>
<item>4x Native (2560x2112)</item>
<item>5x Native (3200x2640)</item>
<item>6x Native (3840x3168) for 4K</item>
</string-array>
<integer-array name="internalResolutionValues" translatable="false">
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
@@ -4,13 +4,48 @@

#include "Core/Config/GraphicsSettings.h"

#include <optional>
#include <string>

#include "Common/Config/Config.h"
#include "Common/StringUtil.h"
#include "VideoCommon/VideoConfig.h"

namespace Config
{
std::optional<int> ConvertFromLegacyEFBScale(int efb_scale)
{
// In game INIs, -1 was used as a special value meaning
// "use the value from the base layer but round it to an integer scale".
// We only support integer scales nowadays, so we can simply ignore -1
// in game INIs in order to automatically use a previous layer's value.
if (efb_scale < 0)
return {};

return efb_scale - (efb_scale > 0) - (efb_scale > 2) - (efb_scale > 4);
}

std::optional<int> ConvertFromLegacyEFBScale(const std::string& efb_scale)
{
int efb_scale_int;
if (!TryParse(efb_scale, &efb_scale_int))
return {};
return ConvertFromLegacyEFBScale(efb_scale_int);
}

int ConvertToLegacyEFBScale(int efb_scale)
{
return efb_scale + (efb_scale >= 0) + (efb_scale > 1) + (efb_scale > 2);
}

std::optional<int> ConvertToLegacyEFBScale(const std::string& efb_scale)
{
int efb_scale_int;
if (!TryParse(efb_scale, &efb_scale_int))
return {};
return ConvertToLegacyEFBScale(efb_scale_int);
}

// Configuration Information

// Graphics.Hardware
@@ -60,8 +95,7 @@ const ConfigInfo<bool> GFX_ENABLE_PIXEL_LIGHTING{{System::GFX, "Settings", "Enab
const ConfigInfo<bool> GFX_FAST_DEPTH_CALC{{System::GFX, "Settings", "FastDepthCalc"}, true};
const ConfigInfo<u32> GFX_MSAA{{System::GFX, "Settings", "MSAA"}, 1};
const ConfigInfo<bool> GFX_SSAA{{System::GFX, "Settings", "SSAA"}, false};
const ConfigInfo<int> GFX_EFB_SCALE{{System::GFX, "Settings", "EFBScale"},
static_cast<int>(SCALE_1X)};
const ConfigInfo<int> GFX_EFB_SCALE{{System::GFX, "Settings", "EFBScale"}, 1};
const ConfigInfo<bool> GFX_TEXFMT_OVERLAY_ENABLE{{System::GFX, "Settings", "TexFmtOverlayEnable"},
false};
const ConfigInfo<bool> GFX_TEXFMT_OVERLAY_CENTER{{System::GFX, "Settings", "TexFmtOverlayCenter"},
@@ -4,12 +4,18 @@

#pragma once

#include <optional>
#include <string>

#include "Common/Config/Config.h"

namespace Config
{
std::optional<int> ConvertFromLegacyEFBScale(int efb_scale);
std::optional<int> ConvertFromLegacyEFBScale(const std::string& efb_scale);
int ConvertToLegacyEFBScale(int efb_scale);
std::optional<int> ConvertToLegacyEFBScale(const std::string& efb_scale);

// Configuration Information

// Graphics.Hardware

0 comments on commit e41a990

Please sign in to comment.