summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--settings.c2
-rw-r--r--settings_gui.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/settings.c b/settings.c
index 853ba7b9d..ed8edcace 100644
--- a/settings.c
+++ b/settings.c
@@ -961,7 +961,7 @@ static const SettingDesc _music_settings[] = {
extern bool _force_full_redraw, _double_size;
extern uint _display_hz, _fullscreen_bpp;
-extern const SettingDescGlobVarList _win32_settings[] = {
+static const SettingDescGlobVarList _win32_settings[] = {
SDTG_VAR("display_hz", SLE_UINT, S, 0, _display_hz, 0, 0, 120, STR_NULL, NULL),
SDTG_BOOL("force_full_redraw", S, 0, _force_full_redraw,false, STR_NULL, NULL),
SDTG_VAR("fullscreen_bpp", SLE_UINT, S, 0, _fullscreen_bpp, 8, 8, 32, STR_NULL, NULL),
diff --git a/settings_gui.c b/settings_gui.c
index a452c26b4..49d22600e 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -711,13 +711,11 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
if ((sdb->flags & SGF_NETWORK_ONLY) && !_networking) editable = false;
if (sdb->cmd == SDT_BOOLX) {
- static const _bool_ctabs[4] = {9, 7, 4, 6};
+ static const int _bool_ctabs[2][2] = {{9, 4}, {7, 6}};
/* Draw checkbox for boolean-value either on/off */
bool on = (*(bool*)var);
- byte ctab = !!on + (!!editable * 2);
- assert(ctab < lengthof(_bool_ctabs));
- DrawFrameRect(x, y, x + 19, y + 8, _bool_ctabs[ctab], on ? FR_LOWERED : 0);
+ DrawFrameRect(x, y, x + 19, y + 8, _bool_ctabs[!!on][!!editable], on ? FR_LOWERED : 0);
SetDParam(0, on ? STR_CONFIG_PATCHES_ON : STR_CONFIG_PATCHES_OFF);
} else {
int32 value;