summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-10-06 01:18:12 +0000
committerbelugas <belugas@openttd.org>2006-10-06 01:18:12 +0000
commitb46ea965125d95d3d7f8a82f79f6b3884078631d (patch)
tree70ba00bb051fdf3e45c2ccedee3003919c6bce38
parent81e3101a018b980c21ba0b05997c0f7ac685ac3d (diff)
downloadopenttd-b46ea965125d95d3d7f8a82f79f6b3884078631d.tar.xz
(svn r6660) -Fix(r6631): Prevent the fast-foward button to toggle up and down when pressing shift.
The _fastforward and _pause bool are not exactly used as bool. So, when doing test with them, amek it so that the will appear as such
-rw-r--r--main_gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main_gui.c b/main_gui.c
index facf9a514..b04622e6e 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -1838,12 +1838,12 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
case WE_ON_EDIT_TEXT: HandleOnEditText(e); break;
case WE_MOUSELOOP:
- if (IsWindowWidgetLowered(w, 0) != _pause) {
+ if (IsWindowWidgetLowered(w, 0) != !!_pause) {
ToggleWidgetLoweredState(w, 0);
SetWindowDirty(w);
}
- if (IsWindowWidgetLowered(w, 1) != _fast_forward) {
+ if (IsWindowWidgetLowered(w, 1) != !!_fast_forward) {
ToggleWidgetLoweredState(w, 1);
SetWindowDirty(w);
}
@@ -2033,12 +2033,12 @@ static void ScenEditToolbarWndProc(Window *w, WindowEvent *e)
case WE_ON_EDIT_TEXT: HandleOnEditText(e); break;
case WE_MOUSELOOP:
- if (IsWindowWidgetLowered(w, 0) != _pause) {
+ if (IsWindowWidgetLowered(w, 0) != !!_pause) {
ToggleWidgetLoweredState(w, 0);
SetWindowDirty(w);
}
- if (IsWindowWidgetLowered(w, 1) != _fast_forward) {
+ if (IsWindowWidgetLowered(w, 1) != !!_fast_forward) {
ToggleWidgetLoweredState(w, 1);
SetWindowDirty(w);
}