Skip to content

Commit 6c14378

Browse files
Forgon2100Forgon2100
authored andcommittedMay 17, 2018
fixes #4777: warn about setting antialiasing to a value > 16, which can cause crashes
1 parent f8e1dca commit 6c14378

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
 

‎ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* Change: Factories being destroyed could cause annoying asserts. Now set to quiet warnings (commit:616f142c6a031fc36aceb05f8c40156c563225bb)
1111
* Change: Improved Windows installers (ticket:4748)
1212
* Change: Location of configuration directory (commit:54901bcd1672c9e22db35c66741ec2eda123b491)
13+
* Change: Warn about setting antialiasing to a value > 16, which can cause crashes (ticket:4777)
1314
* Fix: Trying not to crash on loading unknown templates (commit:44a1e1085d4811a0ceeeac8406457098f190c4a3, ticket:4581)
1415
* Fix: Always show template designs (commit:20c70fd00a5f155a5ff465866841591e4a23946e, ticket:4440)
1516
* Fix: Do not desync when destroying droids with animations (commit:123ded59aedc53dc2344be9807c321774613946f)

‎src/frontend.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,12 @@ static bool startVideoOptionsMenu()
11351135
addTextButton(FRONTEND_FSAA, FRONTEND_POS5X - 35, FRONTEND_POS6Y, _("Antialiasing*"), WBUT_SECONDARY);
11361136
addTextButton(FRONTEND_FSAA_R, FRONTEND_POS5M - 55, FRONTEND_POS6Y, videoOptionsAntialiasingString(), WBUT_SECONDARY);
11371137

1138+
W_LABEL *antialiasing_label = new W_LABEL(parent);
1139+
antialiasing_label->setGeometry(FRONTEND_POS1X + 48, FRONTEND_POS1Y - 18, FRONTEND_BUTWIDTH - FRONTEND_POS1X - 48, FRONTEND_BUTHEIGHT);
1140+
antialiasing_label->setFontColour(WZCOL_YELLOW);
1141+
antialiasing_label->setString(_("Warning: Antialiasing can cause crashes, especially with values > 16"));
1142+
antialiasing_label->setTextAlignment(WLAB_ALIGNBOTTOMLEFT);
1143+
11381144
// Display Scale
11391145
if (wzAvailableDisplayScales().size() > 1)
11401146
{

‎src/warzoneconfig.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ bool war_getFullscreen()
106106

107107
void war_setAntialiasing(int antialiasing)
108108
{
109+
if (antialiasing > 16)
110+
{
111+
debug(LOG_WARNING, "Antialising set to value > 16, which can cause crashes.");
112+
}
109113
warGlobs.antialiasing = antialiasing;
110114
}
111115

0 commit comments

Comments
 (0)