Skip to content

Commit

Permalink
Moved "antialias" config option to "graphics" section
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Oct 25, 2023
1 parent 69e3afe commit 32958c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Editor/AGS.Editor/AGSEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ public void WriteConfigFile(string configFilePath, bool resetFile = true)

sections["graphics"]["filter"] = _game.DefaultSetup.GraphicsFilter;
sections["graphics"]["vsync"] = _game.DefaultSetup.VSync ? "1" : "0";
sections["misc"]["antialias"] = _game.DefaultSetup.AAScaledSprites ? "1" : "0";
sections["graphics"]["antialias"] = _game.DefaultSetup.AAScaledSprites ? "1" : "0";
bool render_at_screenres = _game.Settings.RenderAtScreenResolution == RenderAtScreenResolution.UserDefined ?
_game.DefaultSetup.RenderAtScreenResolution : _game.Settings.RenderAtScreenResolution == RenderAtScreenResolution.True;
sections["graphics"]["render_at_screenres"] = render_at_screenres ? "1" : "0";
Expand Down
4 changes: 2 additions & 2 deletions Engine/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ static void read_legacy_graphics_config(const ConfigTree &cfg)
}

usetup.Screen.Params.RefreshRate = CfgReadInt(cfg, "misc", "refresh");
usetup.enable_antialiasing = CfgReadInt(cfg, "misc", "antialias");
}

static void read_legacy_config(const ConfigTree &cfg)
Expand Down Expand Up @@ -331,6 +332,7 @@ void apply_config(const ConfigTree &cfg)
usetup.Screen.Params.RefreshRate = CfgReadInt(cfg, "graphics", "refresh");
usetup.Screen.Params.VSync = CfgReadBoolInt(cfg, "graphics", "vsync");
usetup.RenderAtScreenRes = CfgReadBoolInt(cfg, "graphics", "render_at_screenres");
usetup.enable_antialiasing = CfgReadBoolInt(cfg, "graphics", "antialias", usetup.enable_antialiasing);
usetup.Supersampling = CfgReadInt(cfg, "graphics", "supersampling", 1);
usetup.software_render_driver = CfgReadString(cfg, "graphics", "software_driver");

Expand All @@ -340,8 +342,6 @@ void apply_config(const ConfigTree &cfg)
rotation_str, CstrArr<kNumScreenRotationOptions>{ "unlocked", "portrait", "landscape" },
usetup.rotation);

usetup.enable_antialiasing = CfgReadBoolInt(cfg, "misc", "antialias");

// Custom paths
usetup.load_latest_save = CfgReadBoolInt(cfg, "misc", "load_latest_save", usetup.load_latest_save);
usetup.user_data_dir = CfgReadString(cfg, "misc", "user_data_dir");
Expand Down
6 changes: 2 additions & 4 deletions Engine/platform/windows/setup/winsetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ void WinConfig::Load(const ConfigTree &cfg)
RenderAtScreenRes = CfgReadInt(cfg, "graphics", "render_at_screenres", RenderAtScreenRes ? 1 : 0) != 0;
else
RenderAtScreenRes = locked_render_at_screenres != 0;

AntialiasSprites = CfgReadInt(cfg, "misc", "antialias", AntialiasSprites ? 1 : 0) != 0;
AntialiasSprites = CfgReadInt(cfg, "graphics", "antialias", AntialiasSprites ? 1 : 0) != 0;

AudioEnabled = CfgReadBoolInt(cfg, "sound", "enabled", AudioEnabled);
AudioDriverId = CfgReadString(cfg, "sound", "driver", AudioDriverId);
Expand Down Expand Up @@ -201,8 +200,7 @@ void WinConfig::Save(ConfigTree &cfg, const Size &desktop_res)
CfgWriteInt(cfg, "graphics", "windowed", Windowed ? 1 : 0);
CfgWriteInt(cfg, "graphics", "vsync", VSync ? 1 : 0);
CfgWriteInt(cfg, "graphics", "render_at_screenres", RenderAtScreenRes ? 1 : 0);

CfgWriteInt(cfg, "misc", "antialias", AntialiasSprites ? 1 : 0);
CfgWriteInt(cfg, "graphics", "antialias", AntialiasSprites ? 1 : 0);

CfgWriteInt(cfg, "sound", "enabled", AudioEnabled ? 1 : 0);
CfgWriteString(cfg, "sound", "driver", AudioDriverId);
Expand Down

0 comments on commit 32958c6

Please sign in to comment.