summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/main_gui.c b/main_gui.c
index 845295035..ad28e506b 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -43,8 +43,8 @@
#include "network_gui.h"
#include "industry.h"
-static int _rename_id;
-static int _rename_what;
+static int _rename_id = 1;
+static int _rename_what = -1;
static byte _terraform_size = 1;
RailType _last_built_railtype;
@@ -90,10 +90,12 @@ void HandleOnEditText(WindowEvent *e)
} else {
NetworkServer_HandleChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, id, msg, NETWORK_SERVER_INDEX);
}
- break;
- }
+ } break;
#endif /* ENABLE_NETWORK */
+ default: NOT_REACHED();
}
+
+ _rename_id = _rename_what = -1;
}
/**
@@ -1840,12 +1842,12 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
case WE_MOUSELOOP:
if (IsWindowWidgetLowered(w, 0) != !!_pause) {
ToggleWidgetLoweredState(w, 0);
- SetWindowDirty(w);
+ InvalidateWidget(w, 0);
}
if (IsWindowWidgetLowered(w, 1) != !!_fast_forward) {
ToggleWidgetLoweredState(w, 1);
- SetWindowDirty(w);
+ InvalidateWidget(w, 1);
}
break;
@@ -2371,7 +2373,7 @@ void SetupColorsAndInitialWindow(void)
{
uint i;
Window *w;
- int width,height;
+ int width, height;
for (i = 0; i != 16; i++) {
const byte *b = GetNonSprite(PALETTE_RECOLOR_START + i);