GPU: Add display line offset game setting

Use when games need additional cropping.
This commit is contained in:
Connor McLaughlin
2020-12-03 22:31:21 +10:00
parent c9ca57f013
commit 362905e3df
11 changed files with 163 additions and 25 deletions

View File

@ -489,7 +489,7 @@ void LibretroHostInterface::OnSystemDestroyed()
m_using_hardware_renderer = false;
}
static std::array<retro_core_option_definition, 46> s_option_definitions = {{
static std::array<retro_core_option_definition, 49> s_option_definitions = {{
{"duckstation_Console.Region",
"Console Region",
"Determines which region/hardware to emulate. Auto-Detect will use the region of the disc inserted.",
@ -834,6 +834,45 @@ static std::array<retro_core_option_definition, 46> s_option_definitions = {{
"LUT"
#endif
},
{"duckstation_Display.LineStartOffset",
"Display Line Start Offset",
"Pads or crops off lines from the top of the displayed image.",
{{"-30", "-30"}, {"-29", "-29"}, {"-28", "-28"}, {"-27", "-27"}, {"-26", "-26"}, {"-25", "-25"}, {"-24", "-24"},
{"-23", "-23"}, {"-22", "-22"}, {"-21", "-21"}, {"-20", "-20"}, {"-19", "-19"}, {"-18", "-18"}, {"-17", "-17"},
{"-16", "-16"}, {"-15", "-15"}, {"-14", "-14"}, {"-13", "-13"}, {"-12", "-12"}, {"-11", "-11"}, {"-10", "-10"},
{"-9", "-9"}, {"-8", "-8"}, {"-7", "-7"}, {"-6", "-6"}, {"-5", "-5"}, {"-4", "-4"}, {"-3", "-3"},
{"-2", "-2"}, {"-1", "-1"}, {"0", "0"}, {"1", "1"}, {"2", "2"}, {"3", "3"}, {"4", "4"},
{"5", "5"}, {"6", "6"}, {"7", "7"}, {"8", "8"}, {"9", "9"}, {"10", "10"}, {"11", "11"},
{"12", "12"}, {"13", "13"}, {"14", "14"}, {"15", "15"}, {"16", "16"}, {"17", "17"}, {"18", "18"},
{"19", "19"}, {"20", "20"}, {"21", "21"}, {"22", "22"}, {"23", "23"}, {"24", "24"}, {"25", "25"},
{"26", "26"}, {"27", "27"}, {"28", "28"}, {"29", "29"}, {"30", "30"}},
"0"},
{"duckstation_Display.LineEndOffset",
"Display Line End Offset",
"Pads or crops off lines from the bottom of the displayed image.",
{{"-30", "-30"}, {"-29", "-29"}, {"-28", "-28"}, {"-27", "-27"}, {"-26", "-26"}, {"-25", "-25"}, {"-24", "-24"},
{"-23", "-23"}, {"-22", "-22"}, {"-21", "-21"}, {"-20", "-20"}, {"-19", "-19"}, {"-18", "-18"}, {"-17", "-17"},
{"-16", "-16"}, {"-15", "-15"}, {"-14", "-14"}, {"-13", "-13"}, {"-12", "-12"}, {"-11", "-11"}, {"-10", "-10"},
{"-9", "-9"}, {"-8", "-8"}, {"-7", "-7"}, {"-6", "-6"}, {"-5", "-5"}, {"-4", "-4"}, {"-3", "-3"},
{"-2", "-2"}, {"-1", "-1"}, {"0", "0"}, {"1", "1"}, {"2", "2"}, {"3", "3"}, {"4", "4"},
{"5", "5"}, {"6", "6"}, {"7", "7"}, {"8", "8"}, {"9", "9"}, {"10", "10"}, {"11", "11"},
{"12", "12"}, {"13", "13"}, {"14", "14"}, {"15", "15"}, {"16", "16"}, {"17", "17"}, {"18", "18"},
{"19", "19"}, {"20", "20"}, {"21", "21"}, {"22", "22"}, {"23", "23"}, {"24", "24"}, {"25", "25"},
{"26", "26"}, {"27", "27"}, {"28", "28"}, {"29", "29"}, {"30", "30"}},
"0"},
{"duckstation_GPU.PGXPTolerance",
"PGXP Geometry Tolerance",
"Ignores precise positions if the difference exceeds this threshold.",
{
{"-1.0", "None"}, {"0.5", "0.5 pixels"}, {"1.0", "1.0 pixels"}, {"1.5", "1.5 pixels"},
{"2.0", "2.0 pixels"}, {"2.5", "2.5 pixels"}, {"3.0", "3.0 pixels"}, {"3.5", "3.5 pixels"},
{"4.0", "4.0 pixels"}, {"4.5", "4.5 pixels"}, {"5.0", "5.0 pixels"}, {"5.5", "5.5 pixels"},
{"6.0", "6.0 pixels"}, {"6.5", "6.5 pixels"}, {"7.0", "7.0 pixels"}, {"7.5", "7.5 pixels"},
{"8.0", "8.0 pixels"}, {"8.5", "8.5 pixels"}, {"9.0", "9.0 pixels"}, {"9.5", "9.0 pixels"},
{"10.0", "10.0 pixels"},
},
"-1.0"},
{},
}};