Skip to content

Commit

Permalink
fixes #4777: warn about setting antialiasing to a value > 16, which c…
Browse files Browse the repository at this point in the history
…an cause crashes
  • Loading branch information
Forgon2100 authored and Forgon2100 committed May 17, 2018
1 parent f8e1dca commit 6c14378
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Change: Factories being destroyed could cause annoying asserts. Now set to quiet warnings (commit:616f142c6a031fc36aceb05f8c40156c563225bb)
* Change: Improved Windows installers (ticket:4748)
* Change: Location of configuration directory (commit:54901bcd1672c9e22db35c66741ec2eda123b491)
* Change: Warn about setting antialiasing to a value > 16, which can cause crashes (ticket:4777)
* Fix: Trying not to crash on loading unknown templates (commit:44a1e1085d4811a0ceeeac8406457098f190c4a3, ticket:4581)
* Fix: Always show template designs (commit:20c70fd00a5f155a5ff465866841591e4a23946e, ticket:4440)
* Fix: Do not desync when destroying droids with animations (commit:123ded59aedc53dc2344be9807c321774613946f)
Expand Down
6 changes: 6 additions & 0 deletions src/frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,12 @@ static bool startVideoOptionsMenu()
addTextButton(FRONTEND_FSAA, FRONTEND_POS5X - 35, FRONTEND_POS6Y, _("Antialiasing*"), WBUT_SECONDARY);
addTextButton(FRONTEND_FSAA_R, FRONTEND_POS5M - 55, FRONTEND_POS6Y, videoOptionsAntialiasingString(), WBUT_SECONDARY);

W_LABEL *antialiasing_label = new W_LABEL(parent);
antialiasing_label->setGeometry(FRONTEND_POS1X + 48, FRONTEND_POS1Y - 18, FRONTEND_BUTWIDTH - FRONTEND_POS1X - 48, FRONTEND_BUTHEIGHT);
antialiasing_label->setFontColour(WZCOL_YELLOW);
antialiasing_label->setString(_("Warning: Antialiasing can cause crashes, especially with values > 16"));
antialiasing_label->setTextAlignment(WLAB_ALIGNBOTTOMLEFT);

// Display Scale
if (wzAvailableDisplayScales().size() > 1)
{
Expand Down
4 changes: 4 additions & 0 deletions src/warzoneconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ bool war_getFullscreen()

void war_setAntialiasing(int antialiasing)
{
if (antialiasing > 16)
{
debug(LOG_WARNING, "Antialising set to value > 16, which can cause crashes.");
}
warGlobs.antialiasing = antialiasing;
}

Expand Down

0 comments on commit 6c14378

Please sign in to comment.