From 6dff411f2d445277a59ea4e63278486d5d3cadab Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Mon, 28 Apr 2014 02:35:23 +0100 Subject: [PATCH] fix bugs in game_handle_input_mouse --- src/game.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game.c b/src/game.c index 3aa242b296..3a34b542fa 100644 --- a/src/game.c +++ b/src/game.c @@ -309,7 +309,7 @@ static void game_handle_input_mouse(int x, int y, int state) window_close_by_id(5, 0); if (w != NULL) - window_bring_to_front(w); + w = window_bring_to_front(w); if (widgetIndex == -1) break; @@ -635,7 +635,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) if (w == NULL) return; - window_bring_to_front(w); + w = window_bring_to_front(w); if (widgetIndex == -1) return; @@ -684,7 +684,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) RCT2_GLOBAL(RCT2_ADDRESS_INPUT_STATE, uint8) = INPUT_STATE_SCROLL_LEFT; RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16) = widgetIndex; RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass) = windowClass; - RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windowclass) = windowNumber; + RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber) = windowNumber; RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_CURSOR_X, uint16) = x; RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_CURSOR_Y, uint16) = y;