mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-02 12:49:12 +01:00
Merge feat/opengl-vulkan: settings for the OpenGL 4.6 and Vulkan 1.4 simulator
A transitional variant, since the exe a player runs may not have the new renderers. The old renderers stay in the list and the old keys are still written next to the new ones. A new exe without Vulkan starts OpenGL by itself, an old one reads the word as its legacy renderer, and both pass over the keys they do not know. Taken from Hirek193's branch: - the new keys as rows of a section of their own, with their texts - their values on the graphics levels, in steps over the six levels here, with High as what the simulator does with nothing set - Vulkan 1.4 in the list of renderers, and its own keys marked as idle without it - gfx.buffer.percent next to the old buffer keys, read before them - gfx.antialiasing saved below multisampling, for the later line to count Keys checked against feat/gl46-migration of the simulator. Left out, as this branch has its own or does not need them: the rewritten settings page and its five levels, GraphicsRules, the DLSS library check, eu07.ini import and export, and the removal of the old renderers.
This commit is contained in:
@@ -17,6 +17,31 @@ public class ConfigFileTests
|
||||
Assert.Equal($"a 1{nl}b 2{nl}", ConfigFile.Parse("a 1\r\nb 2\r\n").ToText());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void A_line_above_another_moves_right_below_it()
|
||||
{
|
||||
var config = ConfigFile.Parse("gfx.antialiasing taa\nwidth 800\nmultisampling 2\nheight 600\n");
|
||||
|
||||
config.MoveAfter("gfx.antialiasing", "multisampling");
|
||||
|
||||
Assert.Equal(new[] { "width 800", "multisampling 2", "gfx.antialiasing taa", "height 600", "" }, Lines(config));
|
||||
Assert.Equal("taa", config.GetRaw("gfx.antialiasing"));
|
||||
Assert.Equal("600", config.GetRaw("height"));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("multisampling 2\nwidth 800\ngfx.antialiasing taa\n")]
|
||||
[InlineData("multisampling 2\n")]
|
||||
[InlineData("gfx.antialiasing taa\n")]
|
||||
public void A_line_below_or_alone_stays_where_it_is(string text)
|
||||
{
|
||||
var config = ConfigFile.Parse(text);
|
||||
|
||||
config.MoveAfter("gfx.antialiasing", "multisampling");
|
||||
|
||||
Assert.Equal(ConfigFile.Parse(text).ToText(), config.ToText());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Removing_a_key_comments_every_line_that_sets_it()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user